Phillip Mangwiro wrote:

Egor Egorov wrote:

"Phillip Mangwiro" <[EMAIL PROTECTED]> wrote:

I'm getting an Error 1130, ("MyDNSName is not allowed to connect to this
machine"), whenever I try to connect to MySQL server from any client by
using its IP or "friendly" DNS name other than 127.0.0.1 or localhost.
This has happened on three machines so far, is there something I forgot to enable/disable?

There's something you forgot to read. The privilege system is explained in the manual <http://dev.mysql.com/doc/mysql/en/Privileges.html>. MySQL users are the combination of username and connecting host. Different host = diffferent user.


Are you sure that GRANTs are correct? Take a look at http://dev.mysql.com/doc/mysql/en/GRANT.html

Here's what happens:

C:\mysql\bin>mysqlc -u root -p -h netadmin
Enter password: *********
ERROR 1130: Host 'netadmin.kptc.org.zw' is not allowed to connect to this MySQL server

[EMAIL PROTECTED] does not have permission to connect to mysql. That is, there is no mysql account which matches [EMAIL PROTECTED]


But if I try it without the host parameter I connect succesfully:
     C:\mysql\bin>mysqlc -u root -p
   Enter password: *****
   Welcome to the MySQL monitor.  Commands end with ; or \g.
   Your MySQL connection id is 31368 to server version: 4.0.20a-nt
   Type 'help' for help.
   mysql> \q
   Bye

Without -h, you connect via unix socket to the localhost server as [EMAIL PROTECTED], which does have an account, and is allowed to connect.


root has all priviledges but isn't allowed to connect when using the host parameter.

[EMAIL PROTECTED] has all privileges. [EMAIL PROTECTED] doesn't yet exist.


In any case, the unix socket is more efficient, as it avoids the tcp/ip overhead, so I'm not sure why you'd want to connect via tcp/ip from the same machine as the server.

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to