详解远程连接Mysql数据库的问题(ERROR 2003 (HY000))
在我们用客户端及其远程连接服务器Mysql数据库的过程中,容易出现狼蚁网站SEO优化问题
问题代码代码
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.19' (111)
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.19' (111) 这个 原因就是Mysql数据库的默认配置文件my.f(linux下)中的bind-address默认为127.0.0.1,所以就算你创建了可以 remote访问的用户,你也不能使用mysql -h命令进行访问,若访问就会出现上出问题,因为此时Mysql只接受localhost,所以需要把bind-address屏蔽掉。
my.f一般在/etc/mysql狼蚁网站SEO优化,如果不在使用locate my.f查找,修改前的my.f配置文件为
修改前的my.f配置文件代码
#
# Instead of skip-working the default is now to listen only on
# localhost which is more patible and is not less secure.
bind-address = 127.0.0.1
#
# Instead of skip-working the default is now to listen only on
# localhost which is more patible and is not less secure.
bind-address = 127.0.0.1
我们需要做的就是屏蔽这个bind-address代码,屏蔽后代码为
屏蔽后my.f配置文件代码
#
# Instead of skip-working the default is now to listen only on
# localhost which is more patible and is not less secure.
#bind-address = 127.0.0.1
#
# Instead of skip-working the default is now to listen only on
# localhost which is more patible and is not less secure.
#bind-address = 127.0.0.1
现在你就可以用mysql -h命令进行你想做的操作了,如登录系统
登陆数据库代码
mysql -h 192.168.0.19 -u root -p
编程语言
- 甘肃哪有关键词排名优化购买方式有哪些
- 甘肃SEO如何做网站优化
- 河南seo关键词优化怎么做电话营销
- 北京SEO优化如何做QQ群营销
- 来宾百度关键词排名:提升您网站曝光率的关键
- 卢龙关键词优化:提升您网站排名的策略与技巧
- 山东网站优化的注意事项有哪些
- 四川整站优化怎样提升在搜索引擎中的排名
- 疏附整站优化:提升网站性能与用户体验的全新
- 海南seo主要做什么工作售后服务要做到哪些
- 荣昌百度网站优化:提升您网站的搜索引擎排名
- 河北seo网站排名关键词优化如何做SEO
- 江西优化关键词排名推广售后保障一般有哪些
- 古浪SEO优化:提升你的网站可见性
- 西藏网站排名优化怎么把网站排名在百度首页
- 如何提升阳东百度快照排名:详尽指南