军哥,我数据库宁一台主机远程连接不上,请问什么问题?
2016-09-16 04:15:23 ERROR db_transfer.py:208 Traceback (most recent call last):File "/root/shadowsocks/db_transfer.py", line 201, in thread_db
rows = db_instance.pull_db_all_user()
File "/root/shadowsocks/db_transfer.py", line 313, in pull_db_all_user
db=self.cfg["db"], charset='utf8')
File "/usr/lib/python2.7/site-packages/cymysql/__init__.py", line 85, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/cymysql/connections.py", line 244, in __init__
self._connect()
File "/usr/lib/python2.7/site-packages/cymysql/connections.py", line 409, in _connect
raise OperationalError(2003, "Can't connect to MySQL server on %r (%s)" % (self.host, e.args))
OperationalError: (2003, "Can't connect to MySQL server on u'138.128.209.**' (110)") 检查mysql是否运行
检查iptables
检查mysql权限里的设置 # netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 406/nginx: master p
tcp 0 0 0.0.0.0:26811 0.0.0.0:* LISTEN 129/sshd
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 895/mysqld
数据库user表
localhostroot 密码
127.0.0.1 root 密码
::1 root密码
回复 2# 的帖子
mysql运行中,端口3306 ,user表有问题吗?# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 406/nginx: master p
tcp 0 0 0.0.0.0:26811 0.0.0.0:* LISTEN 129/sshd
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 895/mysqld
数据库user表
localhostroot 密码
127.0.0.1 root 密码
::1 root密码 解决了。
新建立个账户,开启远程访问权限。
回复 4# 的帖子
你这用户都没远程连接的
页:
[1]