Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    1

    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.

    Thanks in advance,
    Ros

  2. #2
    Join Date
    Jan 2003
    Location
    Vietnam
    Posts
    188

    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

    qha_vn

  3. #3
    Join Date
    Oct 2002
    Posts
    13
    hmm
    Try this
    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;
    Last edited by nuno; 02-01-03 at 14:39.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •