Unable to start MySQL service. Another MySQL daemon is already running with the same UNIX socket, unablemysql

Source: Internet
Author: User

Unable to start MySQL service. Another MySQL daemon is already running with the same UNIX socket, unablemysql
Unable to start MySQL service. Another MySQL daemon is already running with the same UNIX socket

 

Features

If you encounter any of the following problems, this article may help you.

  • MySQL starts/stops properly when started/stopped with the mysqld service restart, but MySQL does not start when a server is rebooted.
  • After upgrading MySQL, binaries mysqld will not start at all.
  • After relocating the MySQL datadir or changing the default port, MySQL does not start.

All of the above problems share a common feature: you cannot use service mysqld restart/start or other methods to start mysql.

1234 [Root @ server ~] #/Etc/init. d/mysqld startAnother MySQL daemon already running with the same unix socket. Starting mysqld: [FAILED]

Cause

The mysqld socket is not removed because the service is shut down or stopped abnormally. This unusual method is common in the following scenarios: system power failure and restart.

Solution

There are several common cases when the socket file is not removed. Please check the below use cases and apply the appropriate resolution.

1. View/var/log/mysqld. log. You will find a log similar to the following:

123456789 13120721: 15: 47mysqld_safeStartingmysqlddaemonwithdatabasesfrom/var/lib/mysql/usr/libexec/mysqld: Can't create/write to file '/tmp/ib0h0Wt3' (Errcode: 13) 131207 21:15:47 InnoDB: Error: unable to create temporary file; errno: 13131207 21:15:47 [ERROR] Plugin 'innodb' init function returned error.131207 21:15:47 [ERROR] Plugin 'innodb' registry as a storage engine failed.131207 21:15:47 [Note] Event Scheduler: loaded 0 events131207 21:15:47 [Note]/usr/libexec/mysqld: ready for connections. version: '5. 1.71 'socket: '/var/lib/mysql. sock'port: 3306 Sourcedistribution

The solutions to this problem are as follows:

1 Rm/var/lib/mysql. sock

1 <Spanstyle = "font-family: monospace;"> mv/var/lib/mysql. sock/var/lib/mysql. sock. bak </span>

I tried a lot and found that the startup was still unsuccessful. take a closer look at the log. Not only/var/lib/mysql is written at the end of the text. sock, And/var/lib/mysql/mysql1.sock,/var/lib/mysql/mysql22.sock. these files also exist in my folder directory. as a result, mysql does not only generate myql after it is shut down unexpectedly. sock, there are other sock files. After I rename all these three sock files, myql will start normally.

1 Rm/var/lib/mysql. sock

1 Rm/var/lib/mysql/mysql1.sock

1 Rm/var/lib/mysql/mysql22.sock

2. Summary

When mysql closes abnormally, multiple sock files may exist. to clear all these sock files, mysql can start normally.

 

Original article: Unable to start MySQL service. Another MySQL daemon is already running with the same UNIX socket.

References: http://kb.sp.parallels.com/en/119334

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.