MySQL错误:Can't connect to MySQL server (10060)
来源:互联网 发布:如何注册域名 编辑:程序博客网 时间:2024/05/19 10:13
当远程连接MySQL数据库的时候显示Can't connect to MySQL server (10060),我们从以下几个方面入手,找出错误的原因:
1.网络不通。
检查能不能ping通。
2.防火墙设置。
防火墙是否放过mysql的进程,是否屏蔽了mysql的3306端口。
3.mysql的账户设置。
mysql账户是否不允许远程连接。如果无法连接可以尝试以下方法:
- mysql -u root -p //登录MySQL
- mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION; //任何远程主机都可以访问数据库
- mysql> FLUSH PRIVILEGES; //需要输入次命令使修改生效
- mysql> EXIT //退出
也可以通过修改表来实现远程:
- mysql -u root -p
- mysql> use mysql;
- mysql> update user set host = '%' where user = 'root';
- mysql> select host, user from user;
其实错误的原因也不外乎以上几个方面,相信按照上面的思路找出原因,定能将问题解决掉。如果想了解更多MySQL数据库的问题,请参考:http://database.51cto.com/mysql/,谢谢大家!
转自:http://database.51cto.com/art/201107/274565.htm
0 0
- MySQL错误:Can't connect to MySQL server (10060)
- MySQL错误:Can't connect to MySQL server (10060)
- MySQL错误:Can't connect to MySQL server (10060)
- MySQL错误2003:Can't connect to MySQL server (10060)
- MySQL错误:Can't connect to MySQL server (10060)
- MySQL错误:Can't connect to MySQL server (10060)
- MySQL错误2003:Can't connect to MySQL server (10060)
- MySQL错误:Can't connect to MySQL server (10060)
- 连接MySQL错误:Can't connect to MySQL server (10060)
- MySQL错误2003:Can't connect to MySQL server (10060)
- Can't connect to MySQL server (10060)
- Can't connect to MySQL server (10060)
- MySQL错误:Can't Connect to(10060)
- MySQL错误:Can't connect to(10060)
- MySQL错误:Can't connect to MySQL server ***(111)
- 局域网访问mysql错误:Can't connect to Mysql server on "IP" (10060)
- 局域网访问mysql错误:Can't connect to Mysql server on "IP" (10060)
- 【转】MySql错误:error :Can't connect to MySQL server (10060)解决办法
- 谈谈Android里的Context的使用!!!
- matlab学习笔记
- 让Apache的commons-net-3.3中的FTPClient支持中文
- installAuto.sh
- 回文语句的判断
- MySQL错误:Can't connect to MySQL server (10060)
- 幼年产品狗如何养成?这是完全自我修炼教程!
- Trie树的详解及应用
- asp.net(c#)上传文件时检测文件类型方法小结
- python logging 最佳实践
- Unity回顾2
- 如何去掉Json字符串中反斜杠
- TCP/IP卷一 学习笔记
- MySQL批量SQL插入性能优化