mysql无法通过ip地址链接
2013-12-02 16:44
323 查看
用BitNami搭建个站点(内含mysql数据库服务、phpmyadmin和Apache web Service), 用localhost或127.0.0.1及用户名密码连接没有问题。
但是本机或远程通过ip地址连接就报错了:can't connect to mysql server on 'x.x.x.x' 10061.
当然用户已经授权,允许由局域网或互联网进行外部访问,如:
但还是报错:can't connect to mysql server on 'x.x.x.x' 10061.
找了半天原因终于找到了:
修改安装目录:
我的是C:\BitNami\wampstack-5.4.20-0\mysql\
下my.ini文件的参数:
bind-address=127.0.0.1改成bind-address=0.0.0.0
重启mysql服务。
这样被授权的的用户(允许由局域网或互联网进行外部访问)就可以通过IP远程访问了。
注释:BitNami下的phpmyadmin也是拒绝远程访问的:For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname
需要修改phpmyadmin下相关配置,不过我没研究。
我用XAMPP搭建的站点没出现mysql禁止IP访问的问题。
但是本机或远程通过ip地址连接就报错了:can't connect to mysql server on 'x.x.x.x' 10061.
当然用户已经授权,允许由局域网或互联网进行外部访问,如:
$ /installdir/mysql/bin/mysql -u root -p -e "grant all privileges on *.* to 'root'@'%' identified by 'your_root_password' with grant option";
installdir为安装目录,我的是C:\BitNami\wampstack-5.4.20-0
但还是报错:can't connect to mysql server on 'x.x.x.x' 10061.
找了半天原因终于找到了:
修改安装目录:
$ /installdir/mysql/bin/mysql/
我的是C:\BitNami\wampstack-5.4.20-0\mysql\
下my.ini文件的参数:
bind-address=127.0.0.1改成bind-address=0.0.0.0
重启mysql服务。
这样被授权的的用户(允许由局域网或互联网进行外部访问)就可以通过IP远程访问了。
注释:BitNami下的phpmyadmin也是拒绝远程访问的:For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname
需要修改phpmyadmin下相关配置,不过我没研究。
我用XAMPP搭建的站点没出现mysql禁止IP访问的问题。
相关文章推荐
- mysql通过ip地址无法连接
- mysql通过ip地址无法访问数据库
- JBoss4.2的启动方式-Jboss无法通过IP地址访问,只能用localhost访问
- 解决PHP在DOS命令行下却无法链接MySQL的技术笔记
- window 下 mysql 的无法链接错误信息乱码
- jmeter jdbc无法通过IP连接到mysql解决方案
- PHP通过pdo链接mysql
- web程序本地通过ip地址链接不到数据库oracle11g,异常错误 The Network Adapter could not establish the connection
- 解决PHP在DOS命令行下却无法链接MySQL的技术笔记
- mysql 配置过程中 "write configuration file" 无法通过的问题
- MySQL可以用localhost连接,使用IP地址无法连接问题
- Linux下通过软链接转移mysql目录,解决分区空间不足(转)
- ssm整合时,通过jdbc.properties文件无法连接mysql问题
- WINSOCK RESET解决只能通过IP地址访问目的地址,而域名无法访问的问题。
- SQLServer无法用IP地址链接
- 电脑同时安装SQL2000和SQL2005,2005无法通过IP链接!
- centos,linux下django 链接mysql提示mysql.sock无法打开问题
- oracle无法通过ip地址连接
- 安装MySQL时候最后一步报无法定位程序输入点fesetround于动态链接库MSVCR120.dll
- mysql 用localhost可以登录,但是ip地址无法登录