Search code examples
mysqllinuxcentossequelpro

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


In my office, there is a desktop computer which is CentOS7.2 system, there installed MySQL on it.

and in my computer, I have a Sequel Pro on it.

I want to use the Sequel Pro to connect the desktop computer's mysql.

But there gets this error:

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

The desktop computer ip is 10.10.10.127, mine is 10.10.10.121.


Solution

  • As your situation, you should set the remote login user privileges in your mysql:

    1. In your desktop computer, you login to the mysql:

      mysql -u root -p 
      
    2. grant the priviliges

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

    Then you can use the tool to connect the desktop computer's mysql in your computer.

    You'd better fixed the desktop computer and your computer's LAN ip .