通过终端连接到远程mysql [英] Connect to remote mysql via terminal
本文介绍了通过终端连接到远程mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于测试,我设置了具有%access的用户mysql用户。当我尝试从远程机器连接时,我得到:
For a test I set up user mysql user with % access. When I try to connect from a remote machine I get:
输入密码:
错误2003(HY000):无法在'xxxxxxx'(1)上连接到MySQL服务器
任何想法
推荐答案
尝试评论 bind-address = 127.0。
Try to comment the bind-address = 127.0.0.1
in your /etc/mysql/my.cnf
# security:
# using "localhost" in connects uses sockets by default
# skip-networking
# bind-address = 127.0.0.1 --- commented
并观看结果。如果不工作,尝试使用IP地址,如果仍然不工作。回滚原始文件。
and watch the results. If not work try to use the IP address and if still not work. roll back the original file.
这篇关于通过终端连接到远程mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文