MySQL说:主机';10.10.10.121';不允许连接到此MySQL服务器

MySQL说:主机';10.10.10.121';不允许连接到此MySQL服务器,mysql,linux,centos,sequelpro,Mysql,Linux,Centos,Sequelpro,在我的办公室里,有一台台式电脑,是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 incre

在我的办公室里,有一台台式电脑,是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

根据您的情况,您应该在mysql中设置远程登录用户权限:

  • 在桌面计算机中,您登录到mysql:

    mysql -u root -p 
    
  • 授予特权

    GRANT ALL PRIVILEGES on yourDB.* to 'root'@'10.10.10.121'  IDENTIFIED BY 'the password';
    
  • flush特权

  • 然后您可以使用该工具在您的计算机中连接桌面计算机的mysql


    你最好修复桌面电脑和你电脑的局域网ip

    您正在使用的mysql用户没有访问服务器的权限。提供类似于

    GRANT ALL ON foo.* TO bar@'162.54.10.20' IDENTIFIED BY 'PASSWORD';
    
    其中foo是数据库名称,bar是用户。 您也可以考虑创建新的MySQL用户来访问您的机器。 我希望这有帮助。有关更多信息,请查看。

    可能的副本