From: Michael Widenius Date: March 19 1999 10:08am Subject: ERROR 2002: Can't connect to local MySQL server (2) List-Archive: http://lists.mysql.com/mysql/584 Message-Id: <14066.8515.881337.940026@monty.pp.sci.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit >>>>> "kfarmer" == kfarmer 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