List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:March 19 1999 10:08am
Subject:ERROR 2002: Can't connect to local MySQL server (2)
View as plain text  
>>>>> "kfarmer" == kfarmer  <kfarmer@stripped> writes:

>> Description:
kfarmer> This is the second time I setup MySql.  I had a hard drive crash and
> re-installed.  I lost all of /usr/local.  I'm using the binary version for Solaris 2.6. 
> I've read thru all the docs related to this error.  mysqld.sock does exist and mysqld is
> running as seen below.  I have done nothing special beyond install instructions. One thing
> that is strange is it stating domain name when doing mysqladmin -h widow version, is that
> normal?

kfarmer> Am at a stand-still. Any help would be appreciated.

>> How-To-Repeat:

kfarmer> widow# mysql test
kfarmer> ERROR 2002: Can't connect to local MySQL server (2)

kfarmer> widow# mysqladmin -h localhost version
kfarmer> mysqladmin: connect to server at 'localhost' failed
kfarmer> error: 'Can't connect to local MySQL server (2)'
kfarmer> Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!


kfarmer> widow# mysqladmin -h widow version
kfarmer> mysqladmin: connect to server at 'widow' failed
kfarmer> error: 'Host 'widow.farmer.org' is not allowed to connect to this MySQL
> server'

kfarmer> widow# ls -l /tmp
kfarmer> total 536
kfarmer> srwxrwxrwx   1 root     other          0 Mar 18 13:54 mysqld.sock

Note that mysqladmin is using 'mysql.sock' but mysqld is using 'mysqld.sock' !

You have probably a conflicting my.cnf file somewhere or are using 
a client / server that is compiled with different options.

You can check that this isn't a my.cnf problem by doing.

libexec/mysqld --print-defaults
mysqladmin --print-defaults

The following should alwas work:

mysqladmin --socket=/tmp/mysqld.sock version

To fix the problem with widow.farmer.org, check the 'Access denided'
entry in the MySQL manual!

Regards,
Monty


Thread
ERROR 2002: Can't connect to local MySQL server (2)kfarmer18 Mar
  • ERROR 2002: Can't connect to local MySQL server (2)Michael Widenius19 Mar