MySQL Troubleshooting example: "Another MySQL daemon already running with the same UNIX socket".
[[email protected]121 sbin]# service mysqld statusmysqld has been stopped [[email protected]-121 Sbin] # service Mysqld startanother MySQL Daemon already running with the same UNIX socket. Starting mysqld: [Failed][[email protecte D]-1212002 (HY000): Can'/var/lib/mysql/mysql.sock ' (111)
Linux operating system Abnormal restart, manually start the MySQL service, found unable to start, after Baidu found to be abnormal shutdown caused by, MySQL has a mysql.sock file to record the running status of the instance, because the non-normal shutdown, causing the file to continue to exist, MySQL will check the file at startup, the discovery already exists, then throw this error.
Workaround:
Delete the Mysql.sock file or rename it and return to normal after restarting the MySQL service.
[[Email protected]121/]# cd/var/lib/mysql/[[Email protected]-121mysql]#lsibdata1 ib_logfile0 ib_logfile1 mysql mysql.sock test zabbix[[email protected]-121mysql]#MVmysql.sock Mysql.sock.bak[[email protected]-121mysql]# ll Total dosage233488-RW-RW----1MySQL MySQL228589568May9 to: $ibdata1-RW-RW----1MySQL MySQL5242880May9 to: $Ib_logfile0-RW-RW----1MySQL MySQL5242880May9 to: -ib_logfile1drwx------2MySQL MySQL4096April + -: -mysqlsrwxrwxrwx1MySQL MySQL0April - .: -mysql.sock.bakdrwx------2MySQL MySQL4096April + -: -testdrwx------2MySQL MySQL4096April + the: +Zabbix[[email protected]-121mysql]# [[email protected]-121mysql]# [[email protected]-121mysql]# service mysqld Stop Stop mysqld: [OK][[email protected]-121mysql]# Service mysqld Start is starting mysqld: [OK][[email protected]-121mysql]#
MySQL troubleshooting a case _another MySQL daemon already running with the same UNIX socket