在我的办公室里,有一台台式电脑是CentOS7.2系统,上面安装了MySQL。
在我的电脑里,我有一个续集专业版。
我想使用Sequel Pro连接台式电脑的mysql。
但是出现了这个错误:
Unable to connect to host 10.10.10.127, or the request timed out.
Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).
MySQL said: Host '10.10.10.121' is not allowed to connect to this MySQL server
台式计算机的IP为10.10.10.127
,我的是10.10.10.121
。
答案 0 :(得分:2)
根据您的情况,您应该在mysql中设置远程登录用户权限:
在台式计算机中,您登录到mysql:
mysql -u root -p
授予权益
GRANT ALL PRIVILEGES on yourDB.* to 'root'@'10.10.10.121' IDENTIFIED BY 'the password';
flush privileges
然后,您可以使用该工具连接计算机中的台式计算机的mysql。
您最好修复台式计算机和计算机的局域网IP。
答案 1 :(得分:0)
您使用的mysql用户没有对服务器的访问权限。提供
之类的访问权限GRANT ALL ON foo.* TO bar@'162.54.10.20' IDENTIFIED BY 'PASSWORD';
其中foo是数据库名称,bar是用户。 您还可以考虑创建新的mysql用户以从您的计算机访问。 我希望这有帮助。有关详细信息,请查看http://www.debianhelp.co.uk/remotemysql.htm。