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

MySQL said: Host '10.10.10.121' is not allowed to connect to this MySQL server

我办公室有一台台式电脑,是CentOS7.2系统,上面安装了MySQL

在我的电脑里,我有一个 Sequel Pro。

我想用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中设置远程登录用户权限:

  1. 在您的桌面计算机上,您登录 mysql:

    mysql -u root -p 
    
  2. 授予权限

    GRANT ALL PRIVILEGES on yourDB.* to 'root'@'10.10.10.121'  IDENTIFIED BY 'the password';
    
  3. flush privileges

然后您就可以在您的电脑中使用该工具连接桌面电脑的mysql了。

你最好修好台式电脑和你电脑的局域网ip。

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

的访问权限
GRANT ALL ON foo.* TO bar@'162.54.10.20' IDENTIFIED BY 'PASSWORD';

其中 foo 是数据库名称,bar 是用户。 您也可以考虑创建新的 mysql 用户以从您的计算机访问。 我希望这有所帮助。有关详细信息,请查看 http://www.debianhelp.co.uk/remotemysql.htm .