Unable to connect to any of the specified MySQL hosts. 如何解决
发表于 : 2016-09-07 16:13
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上是通过的。
也成功安装了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上是通过的。