Mysql Error while connection from remote ip on linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ajay Patil
    New Member
    • Feb 2012
    • 1

    Mysql Error while connection from remote ip on linux

    I'm getting a problem while connecting to mysql database from remote host on linux environment. I'm also able to ping mysql server machine and i'm trying to login using below command:

    mysql -u root -s -h ip_address_of_t he_mysql_server (in my case the ipaddress is 192.168.24.2-local network ipaddress)
    IT is giving below error:

    ERROR 1130 (00000): Host '192.168.24.202 ' is not allowed to connect to this MySQL server..

    Pls give the solution, if any body have an idea for the same.


    Thanks & Regards,
    Ajay Patil
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Straight from the MySQL refmanual
    it means that there is no row in the user table with a Host value that matches the client host:

    Host ... is not allowed to connect to this MySQL server

    You can fix this by setting up an account for the combination of client host name and user name that you are using when trying to connect.

    If you do not know the IP address or host name of the machine from which you are connecting, you should put a row with '%' as the Host column value in the user table. After trying to connect from the client machine, use a SELECT USER() query to see how you really did connect. Then change the '%' in the user table row to the actual host name that shows up in the log. Otherwise, your system is left insecure because it permits connections from any host for the given user name.

    On Linux, another reason that this error might occur is that you are using a binary MySQL version that is compiled with a different version of the glibc library than the one you are using. In this case, you should either upgrade your operating system or glibc, or download a source distribution of MySQL version and compile it yourself. A source RPM is normally trivial to compile and install, so this is not a big problem.

    Comment

    Working...