“Another mysqld server running on port: 3306” error

While starting/restarting the MySQL service on a Linux server,MySQL service may start throwing errors as below:

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

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 / or you may comment the bind-address field.

Start the MySQL service:

/etc/init.d/mysqld start

Second- Check if MySQL service is stopped, if not stop the service:

/etc/init.d/mysqld status

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.

/etc/init.d/mysqld start