【问题标题】:MySQL said: Host '10.10.10.121' is not allowed to connect to this MySQL serverMySQL 说:Host '10.10.10.121' is not allowed to connect to this MySQL server
【发布时间】:2018-02-16 00:45:31
【问题描述】:

在我的办公室里,有一台桌面电脑是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 linux centos sequelpro


【解决方案1】:

根据你的情况,你应该在你的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。

【讨论】:

    【解决方案2】:

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

    GRANT ALL ON foo.* TO bar@'162.54.10.20' IDENTIFIED BY 'PASSWORD';
    

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

    【讨论】:

      猜你喜欢
      • 2017-12-05
      • 2013-10-06
      • 2020-08-27
      • 2016-06-20
      • 2020-11-17
      • 2012-07-15
      • 1970-01-01
      • 2021-02-04
      • 2023-03-06
      相关资源
      最近更新 更多