Hi folks,

Now that I can connect to my MySQL server using the Unix sockets (e.g.
   [EMAIL PROTECTED] ~] mysql -u root
I'm moving on to the next step - connecting via TCP/IP.

Since I don't have physical access to the box (well, I'm just too lazy to walk 
down to the basement), I SSH into the box from a second machine (the name of 
the box that 'www.example.com' is running on is called 'daisy'):

shell> ssh www.example.com
[EMAIL PROTECTED]'s password:
[EMAIL PROTECTED] ~] mysql -h localhost -u root -p
Enter password: 
mysql>

Works great. Less filling, too.

But if I try

[EMAIL PROTECTED] ~] mysql -h 127.0.0.1 -u root -p
Enter password: 
ERROR 1130: Host 'localhost.localdomain' is not allowed to connect to this 
MySQL server
[EMAIL PROTECTED] ~]

I've googled through a bunch of posts, and the old line about 'understanding 
the words, but not the sentences' applies here. As best I can tell, this 
problem normally comes up when the domain (such as www.example.com) isn't in 
the users table. In this case, 127.0.0.1 should be equivalent to 'localhost', 
which is in there:

mysql> select host, user, password from mysql.user ;
+------------------+------+------------------+
| host             | user | password         |
+------------------+------+------------------+
| localhost        | root | 48bf4fd20c61a2f0 |
| daisy.example.com | root | 48bf4fd20c61a2f0 |
| localhost        |      |                  |
| daisy.example.com |      |                  |
+------------------+------+------------------+

Do I need to change the 'localhost' entries to 'localhost.localdomain' in 
order for 127.0.0.1 to work? If I do so, will "mysql -h localhost" then fail?

I know I could just try it out myself, but I want to know WHY.... *s*

Thanks,

-- 
Whil

Moving to Linux: Freedom, Choice, Security, Opportunity
http://www.hentzenwerke.com


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

Reply via email to