分页: 1 / 1

Unable to connect to any of the specified MySQL hosts. 如何解决

发表于 : 2016-09-07 16:13
iamiori
ubuntu server 16.04 上安装mysql 5.7

也成功安装了phpmyadmin
在phpmyadmin上把root的 localhost改成了%

在windows10上, 用.net 4.5写的。


##############################################

constring = "Data Source=192.168.177.248; Initial Catalog=mysql; user id=root; password=123456; CharSet=utf8; port=3306;"
Sql = New MySqlConnection(constring)

Try
Sql.Open()
Sql.Close()
msgbox("con OK!")
Catch ex As Exception
msgbox(ex.Message)
End Try


#########################################


返回信息是 Unable to connect to any of the specified MySQL hosts.
MySql.Data.dll 也是在mysql官网上下载了最新的版本。

以上方法是在mysql 5.5上是通过的。

Re: Unable to connect to any of the specified MySQL hosts. 什

发表于 : 2016-09-07 16:14
iamiori
ubuntu 的网卡也设置了静态的ip

Re: Unable to connect to any of the specified MySQL hosts. 如

发表于 : 2016-09-07 18:19
poloshiao
以上方法是在mysql 5.5上是通过的。
Ubuntu 16.04 預設安裝 PHP7.0
跟 mySQL 5 還有許多未充分配合的地方
如果急於解決
建議 暫時退回安裝 PHP5.6
然後再慢慢研究