自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

用Mono來連接MySQL數(shù)據(jù)庫在Linux上

數(shù)據(jù)庫 MySQL
今天我們向大家描述的是在Linux上正確使用Mono來連接MySQL數(shù)據(jù)庫的實際操作方案,其中也有對其實際應(yīng)用代碼的詳細介紹。

此文章主要向大家描述的是在Linux上使用Mono來連接MySQL數(shù)據(jù)庫的一大絕招,我們大家都知道連接MySQL數(shù)據(jù)庫在實際應(yīng)用中是經(jīng)常出現(xiàn)的,所以很多人對其也是備受關(guān)注的。其具體內(nèi)容參考的例子可以再相關(guān)網(wǎng)站上查詢。

特別提出來的是我***次編譯運行的時候出現(xiàn)這樣的錯誤提示:

  1. MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts  
  2. in <0x006c5> MySql.Data.MySqlClient.NativeDriver:Open ()  
  3. in <0x00027> MySql.Data.MySqlClient.Driver:Create (MySql.Data.MySqlClient.MySqlConnectionString settings)  
  4. in <0x0008d> MySql.Data.MySqlClient.MySqlPool:CreateNewPooledConnection ()  
  5. in <0x001b0> MySql.Data.MySqlClient.MySqlPool:GetPooledConnection ()  
  6. in <0x0003f> MySql.Data.MySqlClient.MySqlPool:GetConnection ()  
  7. in <0x000e5> MySql.Data.MySqlClient.MySqlPoolManager:GetConnection (MySql.Data.MySqlClient.MySqlConnectionString settings)  
  8. in <0x00050> MySql.Data.MySqlClient.MySqlConnection:Open () 

不思不得其解,后來找到一個國外的論壇,得到這樣的提示:

  1. The most likely cause of this is that MySQL is not configured to accept tcp/ip connections.  
  2. See here http://dev.mysql.com/doc/mysql/en/can-not-connect-to-server.html  
  3. make sure your /etc/mysql/my.cnf file does not have the "skip-networking" 
  4. feature enabled. This is the default in some installations and disables tcp/ip connections. 

根據(jù)提示我把my.cnf中的

  1. # Instead of skip-networking the default is now to listen only on  
  2. # localhost which is more compatible and is not less secure.  
  3. #bind-address = 172.22.60.126 

bind-address注釋掉,然后重新啟動mysql服務(wù)器程序sudo /etc/init.d/mysql restart就可以正常連接查詢了。以上的相關(guān)內(nèi)容就是對在Linux上使用Mono連接MySQL數(shù)據(jù)庫的介紹,望你能有所收獲。

 

在Linux上使用Mono連接MySQL數(shù)據(jù)庫

上述的相關(guān)內(nèi)容就是對在Linux上使用Mono連接MySQL數(shù)據(jù)庫的描述,希望會給你帶來一些幫助在此方面。

【編輯推薦】

  1. MySQL數(shù)據(jù)庫中最基本的函數(shù)類型
  2. MySQL數(shù)據(jù)庫中的字符串
  3. MySQL數(shù)據(jù)庫權(quán)限設(shè)置的實際運行過程
  4. MySQL 分頁存儲過程的實際操作流程與代碼
  5. MySQL_fetch_row() 和 MySQL_fetch_array() 的差異

 

責(zé)任編輯:佚名 來源: cnblogs
相關(guān)推薦

2011-06-10 10:31:57

QT mysql linux

2017-06-19 08:13:00

Sequel ProMySQL數(shù)據(jù)庫

2024-11-12 14:48:10

2010-06-11 14:46:13

MySQL數(shù)據(jù)庫

2019-11-07 15:02:00

Linuxstrace系統(tǒng)調(diào)用

2010-03-04 17:19:40

2011-04-26 10:37:04

C++MySQL

2011-04-26 10:24:27

C++MySQL

2009-07-14 18:13:36

Microsoft J

2010-05-20 09:45:22

連接MySQL

2010-06-04 18:12:17

MySQL 數(shù)據(jù)庫啟動

2010-05-20 16:13:55

2011-05-26 13:42:50

MFC連接MySql數(shù)據(jù)庫

2020-09-22 15:56:31

Java

2010-10-26 15:00:36

oracle遠程連接數(shù)

2010-06-04 11:21:41

連接MySQL數(shù)據(jù)庫

2010-06-07 14:34:49

連接MySQL 數(shù)據(jù)庫

2015-10-23 14:37:56

DelphiDBExpress連接

2011-03-08 08:49:55

MySQL優(yōu)化單機

2017-11-27 11:41:06

python數(shù)據(jù)庫數(shù)據(jù)分析
點贊
收藏

51CTO技術(shù)棧公眾號