InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
Fix mysqld process using the same InnoDB data or log files Problem
Own a MySQL server and facing Database connection failures and crashes? The reason could be duplicate SQL queries and Processes running on your server. There is an easy fix for this problem.
MySQL Logs throws an error as below
InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
To solve this we will kill all the mysql processes running on the server and start the mysql server manually.
Requirements
- sudo access to MySQL server
Procedure
- Login to the MySQL server
- Verify the logs in location /var/lib/mysql/logs/$hostname
Note – $hostname is your server hostname - Logs should contain an error as below
InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
- Run the following commands to kill mysql processes running on the server
sudo killall -u mysql
or
sudo killall -9 mysql
Note – Flags -u kills all the processes started by user mysql
-9 flag kills all the mysql process running by all users across the server
For proper mysql processes cleanup you can run both commands without any harm. - Start mysql server daemon
sudo service mysqld start
- Your mysql server should be running fine with the problem fixed.