The most common error received while installing MySQL on the server and starting/restarting the MySQL service on a *nix server is:
[ERROR] Can't start server: Bind on TCP/IP port: Address already in use [ERROR] Do you already have another mysqld server running on port: 3306 ? [ERROR] Aborting
Looking at the above error, it seems to be an issue with the MySQL service running on the default port 3306.
Check the MySQL service status by running below command:
If MySQL service is running then stop the service by running below command else skip to step 3.
Check if MySQL service port 3306 is still in use or not by running below command:
netstat -apn | grep 3306
If port is still in use then check the service running on it. If any other service is running on the port 3306 then you will have to either configure MySQL to run on port other than 3306 or stop the service running on port 3306, re-configure its port to some other port number.
Check this post for all the steps to change default port number 3306 on which MySQL service runs.
If MySQL service is found running in step 3 then kill the service using below command:
kill -9 pid
Note: pid is the proceed id you get after running command specified in step 3.
Start the MySQL service using below command:
Check the bind address in the MySQL configuration file my.cnf generally locate at /etc/my.cnf.
Set the bind address IP as per the requirement (mostly localhost / 127.0.0.1)
bind-address = 127.0.0.1
You may comment the bind-address field if MySQL service is running on the server itself.
#bind-address = 127.0.0.1
If you are using remote server for MySQl then provide the server IP in the bind-address field.
bind-address = 126.96.36.199
In the above snippet the MySQL is summed to be running on remote server 188.8.131.52
Start the MySQL service
Hope this helps!