When the service mysqld start when starting MySQL services on a Linux system
Report: Another MySQL daemon already running with the same UNIX socket.
Solution.
Cause multiple MySQL processes use the same socket.
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.
Method Mv/var/lib/mysql/mysql.sock/var/lib/mysql/mysql.sock.bak
Then you can start MySQL, and a mysql.sock file is recreated.
Mysql.sock file explanation on the Internet to find the following explanations, reproduced in this
This mysql.sock should be MySQL host and client on the same host, use UNIX domain socket as the carrier of communication protocol, it is faster than TCP. The common cause of this problem is that your MySQL server is not running.
There are two ways to connect MySQL:
(1), TCP/IP
(2), socket
For Mysql.sock, the function is that the program is in the same machine as the MySQLServer and is available when the local connection is initiated.
For example, you do not need to define a specific IP to connect to the host, as long as it is empty or localhost.
In this case, even if you change the external port of MySQL It is also possible to connect normally.
Since you changed the port in My.ini or MY.CNF, the Mysql.sock is generated with every MySQL server startup. The information has been changed since you restarted MySQL when you finished changing the my.cnf.
Then for an external connection, you must change the port to connect.
Linux under the installation of MySQL connection often back to say that the Mysql.sock file is not found, the solution is simple:
If it is a new installation of MySQL, the prompt cannot find the file, just search under, specify the correct location.
If the Mysql.sock file is mistakenly deleted, you will need to restart the MySQL service, if the restart is successful, will be generated under the DataDir directory Mysql.sock then specify.
If not, you can choose to connect with TCP connection, in fact, under Windows also support pipeline connection mode.
Start MySQL Error