a simple solution for a frequent - first time mysql issue Saturday, March 31, 2007 |
whenever a new mysql server is setup on a new machine, when i try to connect to it from my desktop using the mysql querybrowser, i get into a frequent 'host xxx.xxx.xxx.xxx is not allowed to connect to this mysql server'!
The normal way my sysadmins would fix this problem is to restart the mysql server with '--skip-grant-tables' option.
Somehow i am not very comfortable this way... and today when none of my sysadmins are around and i faced this problem, i was left to my own to probe for the solution.
:) and here it is, a more appropriate, systematic and logical way of getting rid of this error.
GRANT ALL PRIVILEGES ON *.* TO 'user'@'xxx.xxx.%' IDENTIFIED BY 'mypassword';
and voila, there it goes.
Logging from *any* system as the given user with the given password from within the specified range of internal subnet goes through smooth.
Moral : looking out for a solution sincerely and getting to the bottom of the problem, works always!
The normal way my sysadmins would fix this problem is to restart the mysql server with '--skip-grant-tables' option.
Somehow i am not very comfortable this way... and today when none of my sysadmins are around and i faced this problem, i was left to my own to probe for the solution.
:) and here it is, a more appropriate, systematic and logical way of getting rid of this error.
GRANT ALL PRIVILEGES ON *.* TO 'user'@'xxx.xxx.%' IDENTIFIED BY 'mypassword';
and voila, there it goes.
Logging from *any* system as the given user with the given password from within the specified range of internal subnet goes through smooth.
Moral : looking out for a solution sincerely and getting to the bottom of the problem, works always!