ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
[root@gaosheng ~]# mysql -uarcerzhang -parcerzhang -hlocalhost ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) [root@gaosheng ~]# ll /var/lib/mysql/ total 20544 drwx------ 2 mysql mysql 4096 Apr 1 04:01 arcerdb drwx------ 2 mysql mysql 4096 Mar 31 22:34 billy -rw-rw---- 1 mysql mysql 10485760 Apr 1 03:56 ibdata1 -rw-rw---- 1 mysql mysql 5242880 Apr 1 03:56 ib_logfile0 -rw-rw---- 1 mysql mysql 5242880 Mar 30 23:07 ib_logfile1 drwx------ 2 mysql mysql 4096 Mar 31 23:32 meta drwx------ 2 mysql mysql 4096 Mar 30 23:07 mysql srwxrwxrwx 1 mysql mysql 0 Apr 1 03:56 mysql.sock drwx------ 2 mysql mysql 4096 Mar 30 23:07 test drwx------ 2 mysql mysql 4096 Mar 31 00:47 testdb [root@gaosheng ~]# /etc/init.d/mysqld start Starting MySQL: [ OK ] [root@gaosheng ~]# mysql -uarcerzhang -parcerzhang Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.0.77-log Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | arcerdb | | billy | | meta | | mysql | | test | | testdb | +--------------------+ 7 rows in set (0.07 sec) mysql>