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

2.9k views Asked by At

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.

2

There are 2 answers

0
aircraft On BEST ANSWER

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 .

0
Vijay Rathore On

The mysql user you are using is not having the access permission to the server. Provide the access like

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

Where foo is the database name , bar is the user. You may also consider creating new mysql user to access from your machine. I hope this helped. For more information check out http://www.debianhelp.co.uk/remotemysql.htm .