av激情亚洲男人的天堂国语,日韩欧美精品一中文字幕,无码av一区二区三区无码,国产又色又爽又刺激的a片,国产又色又爽又刺激的a片

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

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

10年積累的網(wǎng)站設計制作、成都做網(wǎng)站經(jīng)驗,可以快速應對客戶對網(wǎng)站的新想法和需求。提供各種問題對應的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡服務。我雖然不認識你,你也不認識我。但先網(wǎng)站策劃后付款的網(wǎng)站建設流程,更有臨縣免費網(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服務器程序sudo /etc/init.d/mysql restart就可以正常連接查詢了。以上的相關內(nèi)容就是對在Linux上使用Mono連接MySQL數(shù)據(jù)庫的介紹,望你能有所收獲。

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


分享名稱:用Mono來連接MySQL數(shù)據(jù)庫在Linux上
標題來源:http://uogjgqi.cn/article/djspopi.html
掃二維碼與項目經(jīng)理溝通

我們在微信上24小時期待你的聲音

解答本文疑問/技術咨詢/運營咨詢/技術建議/互聯(lián)網(wǎng)交流