Mysql – Attempting to end anything running of port 3306

mampMySQLport

I have MAMP Pro running on OS X 10.7.2 and it uses port 3306 for MYSQL. It was running fine until this morning when I installed a trial of WebStart. I subsequently did not like Webstart and quit and uninstalled it. My problem now is that MAMP Pro will not Start MYSQL. The log shows:

Check that you do not already have another mysqld process using the same InnoDB data or   log files.

I ran this in terminal:

lsof -i:3306

… and it returned:

COMMAND  PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
mysqld  3966 _mysql   10u  IPv4 0xffffff802505c880      0t0  TCP localhost:mysql (LISTEN)

However, I am not really sure what this means and what to do. I suspect that WebStart put this other process in place for port 3306.

Best Answer

There is already a MySQL Server Daemon process running on 3306 as PID 3966. It could easily be a leftover process from what appears to be a fairly unclean uninstall. You can kill the process in a variety of ways including (but not limited to):

pkill mysqld
kill -9 3966

You can verify it is gone by running the lsof command again or:

ps -ef | grep mysqld

Once you are sure the process is gone your MAMP instance of MySQL should be able to start.

Related Topic