While starting/restarting the MySQL service on a Linux server,MySQL service may start throwing errors as below:
[wpfmb type=’error’ theme=2] Can’t start server: Bind on TCP/IP port:
Address already in use:
Do you already have another mysqld server running on port: 3306 ?Aborting[/wpfmb]
According to an error, It seems to be an issue with the MySQL port 3306.To resolve this error you can check any of the following solution:
First- Check the bind address in the MySQL configuration file /etc/my.cnf
Set is as per the requirement (mostly localhost / 127.0.0.1) or you may comment the bind-address field.
Start the MySQL service:
Second- Check if MySQL service is stopped, if not stop the service:
Check if MySQL service port 3306 is still in use or not:
netstat -apn | grep 3306
If port is still in use then kill the process using the port 3306
kill -9 pid
Now Start the MySQL service.