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

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
iamiori
帖子: 50
注册时间: 2008-01-12 18:43

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

#1

帖子 iamiori » 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上是通过的。
上次由 iamiori 在 2016-09-07 16:49,总共编辑 3 次。
iamiori
帖子: 50
注册时间: 2008-01-12 18:43

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

#2

帖子 iamiori » 2016-09-07 16:14

ubuntu 的网卡也设置了静态的ip
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

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

#3

帖子 poloshiao » 2016-09-07 18:19

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