Unanswered: Host 'blah.com' is not allowed to connect to this MYSQL server
As the title indicates, I cannot connect to my mysql server...even as root.
IF, however, I type the following:
mysql -u root@localhost
I can connect, however, I can't USE any of the databases. I get the following error:
ERROR 1044: Access denied for user: '@localhost' to database 'db'
I'm logged physically to the machine as root so I don't understand what is happening. I've read somewheres that that flushing the privledges table, or granting all option, or even adding the host to the db may help, however I can't connect to the mysql to do any of this.
Any insight would be greatly appreciated as I have spent numerous hours trying to resolve this petty issue.
Re: Host 'blah.com' is not allowed to connect to this MYSQL server
YOu can't connect as root from the machine that runs mysql server or from another host?
Normally for security reason, when first installed, mysql does NOT allow access from hosts other than localhost.
Hope this helps
shell> mysql -u root mysql
mysql> INSERT INTO user (Host,User,Password) VALUES('%','your_db_username_here',PASSWORD ('your_db_password_here'));
mysql> INSERT INTO user (Host,User,Password) VALUES('localhost','your_db_username_here',PASSWOR D ('your_db_password_here'));
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON your_db_name_here.* TO your_db_username_here IDENTIFIED BY 'your_db_password_here';
mysql> FLUSH PRIVILEGES;