Skip navigation

MySQL is not allowing to connect using IP address? but able to connect locally using localhost as hostname?,
then possibly there is a problem with the user account permission.

To Resolve: Create a new user

CREATE USER ‘newuser’@’%’ IDENTIFIED BY ‘some_pass’;

mysql> CREATE USER ‘newuser’@’%’ IDENTIFIED BY ‘some_pass’;
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘newuser’@’%’
->     WITH GRANT OPTION;

Here the difference is ‘newuser’@’%’ string where mostly your other user accounts created using ‘user’@’localhost’ string.

Note: This is tested using MySQL 5x, for other versions please check “how to create a user” for different versions of MySql.

Hope this helps,

Advertisements

One Comment

  1. Perfect!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: