#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    South Africa
    Posts
    8
    Rep Power
    0

    Error 1130, remote connecting access denied.


    Connecting to my mysql server from the box it is installed on [localhost] works perfectly fine. However, when connecting with mysql to it from another box in the network, I get the following:

    ERROR 1130: Host 'lucy.enslaved' is not allowed to connect to this MySQL server

    I have tried looking through the manual/web etc, but didn't come up with much. Where can I allow either ip addresses or hosts to connect to the server? This is mysql installed with the "mysql-server-3.23.56" port on FreeBSD.

    Thanks!
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    FL
    Posts
    10
    Rep Power
    0

    Error 1130, remote connecting access denied


    I run mysql on a Linux server - installed MySQL Control Center in my Win2k computer and got that error message as soon as I tried to connect.

    The way to correct this problem is to simply add an entry to the user table in the MySQL database. You can do this through PhpMyAdmin if you have that available on the server, or you can do it through the server's command line.

    One thing to keep in mind: I believe the password field needs to be inserted (or updated) through the command line, because account name passwords are not stored in plain text, but as a hash value computed from it.

    So after inserting an entry with my PC's name as the hostname value, I did this through the server's command line:

    #> mysql -p
    #> use mysql

    mysql> UPDATE user SET password = password('yourpassword') WHERE hostname = 'whateveryourPCshostnameis';

    One last thing - be sure to stop and start your mysql service after that.

    mysql> exit
    #> service mysql restart

    I was able to connect without any problems after that. I found that many people mentioned this problem in boards, but no one actually offered this solution.

    Hopefully this helps someone with a similar configuration.

    Cheers ~

    Lounatic77
    http://turninyourpicks.com
    Last edited by lounatic77; April 24th, 2004 at 07:15 PM.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    PARIS
    Posts
    4
    Rep Power
    0
    Thanks, it is even simpler with :

    GRANT ALL on * TO '<username>' IDENTIFIED BY '<user password>'
    there is no need to FLUSH PRIVILEGES if <username> is a brand new account.

    This will give all the Right (ALL) for all the TABLES (*) for the login specified by <username> from any host ...

    SELECt user,host FROM user;
    -------------------------
    ! user ! host !
    ------------------------
    ! usertest ! % ! <= All the host
    ! root ! localhost !
    -------------------------
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    FL
    Posts
    10
    Rep Power
    0

    Error 1130, remote connecting access denied


    Yes, that works - just keep in mind that the user will have the ability to connect from any host.

    Sweet

    Lounatic77
    http://turninyourpicks.com

IMN logo majestic logo threadwatch logo seochat tools logo