Not allowed to connect to this MySQL server

By | July 2, 2008

When connecting to a remote mysql server, the login/user must have rights to connect to the mysql server from outside of the local server, i.e. localhost. You need to edit the user record within the mysql.user table or add a new record for this user, giving it access to connect to the mysql server from a host other than localhost.

Login to the mysql server add run the following command:
grant all privileges on *.* to 'user'@'192.168.25.1' identified by 'password' with GRANT OPTION;
Replace “user” and “password” and “192.168.25.1” with your mysql username, password, and the IP address of your computer that you’re connecting (to the mysql server) from.

Remember that your mysql server must also allow connections from remote hosts.


Related Articles:

3 thoughts on “Not allowed to connect to this MySQL server

  1. Pingback: Can’t connect to mysql server on remote server | Mac OS X Leopard & Tiger Dual Boot

  2. GiriPrasad

    Dear All,

    Very Much Thank u for posting this Its Working Fine ..
    I visited lot of site but not able to get solution.

    Thanking u once again.

    regards,
    GiriPrasad.G

    Reply
  3. Steph

    Thanks for providing such a useful post. I can now connect to mysql server. I find replacing the username, passowrd, and IP address quite effective.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *