[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ERROR 2003: Can't connect to MySQL server on ....



Hello list:

 

I tried posting this question on the mysql mailing list but got no answer, so I thought I try it here since it is a Debian system after all.

 

Just finished installing mySQL on a Linux Debian system and I have a question about how the 2 root users that are set up by default. When I look at my user table there is a root user allowed to log in from "localhost" and also another root user but this one is only allowed to log in from "host.mydomain.com" (host being the computer that the mySQL server is installed in). I understand the difference since localhost is when you are working on the computer itself (or remotely through ssh) that has the mySQl server installed and that HOST.MYDOMAIN.COM is the name of the localhost machine on the LAN. However, if you are accessing the mySQL server from HOST.MYDOMAIN.COM isn't that technically the same thing as accessing from localhost? since in order to access the mySQL server from HOST.MYDOMAIN.COM I would have to be at the machine itself wouldn't the server just treat that connection as localhost? I have read on the mysql.com site about how the mySQL server sorts the entries in the user table at the time the server is started by priority of specific entries to less specific ones, however if I have a password set for both root@localhost and root@HOST.MYDOMAIN.COM then which connection would be used? Not that it matters since the set of privileges are the same. I am just really wondering if I need the extra entry of root@HOST.MYDOMAIN.COM when I already have root@localhost. And how would I ever connect to the mySQL server using the root@HOST.MYDOMAIN.COM account?

 

Also I was trying to access the mySQL server using the root@ HOST.MYDOMAIN.COM account by using the command below:

 

Shell> mysql -u root -h ZEUS.OLYMPUS.LOCAL -p

Enter Password: *******

 

And this is what I get: ERROR 2003: Can't connect to MySQL server on 'ZEUS.OLYMPUS.LOCAL' (111) 

 

I also tried using the IP of the server:

Shell> mysql -u root -h 192.168.1.8 -p

Enter Password: *******

 

And I still got: ERROR 2003: Can't connect to MySQL server on '192.168.1.8' (111)

 

What does that mean? I tried searching on the list archives but found nothing on it. And I did check my /etc/hosts file and this is what is in

it:

 

127.0.0.1       localhost

192.168.1.8     ZEUS.OLYMPUS.LOCAL      ZEUS

 

Any help would be appreciated it, thanx!

 

 

 

 

 

 


Reply to: