MySQL error another MySQL daemon already running with the same UNIX socket.

Source: Internet
Author: User


Install cacti the process of configuring the database, but because it is done in the virtual machine, the habitual shutdown is force off the hard shutdown, just configure the cacti in my abnormal shutdown after the problem occurs, the problem is as follows:


[[email protected] ~]#/etc/init.d/mysqld start
Another MySQL daemon already running with the same UNIX socket.
Starting mysqld: [FAILED]


Focus on this sentence:another MySQL daemon already running with the same UNIX socket.

Consulted a lot of information, finally found the answer, because, in the MySQL installation directory has a mysql.sock file. This file is created at MySQL startup and is deleted when MySQL is closed. If it is an abnormal shutdown, MySQL will not have the opportunity to delete the files. When this file still exists, MySQL will not start, prompting the above error.

Two ways to solve:

The first one is to immediately shut down the machine using the command shutdown-h now shutdown, after shutting down the boot, the process stops.

The second one directly renamed the Mysql.sock file. can also be deleted, recommended renaming. And then we can start MySQL.


Here is the foreign original


# shutdown  -h now


This would stop the running services before powering down the machine.

Based on Centos, a additional method for getting it back-again when you run into this problem are to move Mysql.sock:

# mv/var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

# service Mysqld start

Restarting the service creates a new entry called Mqsql.sock



This article from the "Technology life, Simple not simple" blog, please be sure to keep this source http://willis.blog.51cto.com/11907152/1865685

MySQL error another MySQL daemon already running with the same UNIX socket.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.