Problem: XAMPP MySQL Server Won't Start

Problem: XAMPP MySQL Server Won't Start

So today, while using XAMPP on my Mac OSX, I had a problem where MySQL Database server did not want to start. What! Grrr... here are some solutions I've found.

Anyways, I found the problem. MySQL was still running, but it didn't know. In my case, I believe, I had force quit everything so that someone could use my computer (not a good idea, unless necessary). I usually have a thousand programs open while creating sites, so the computer will slow down, especially with Photoshop running.

Solution 1:

Go to Finder » Applications » Utilities » Activity Monitor.

You can now see a list of all processes running on your computer. For mine, the list is long. I mean really. I have to learn to close things.

At the top right, type sql in the Filter/Search box. You may see a process ID (PID) number, the Process name (mysqld), User (_mysql) etc.

If your Activity Monitor application is in its default state, meaning you never touched it, hopefully the dropdown beside the filter box says All Processes. This means you will see the MySQL process below. If not, click that dropdown and choose All Processes.

Click on this process, and then click the big red button on the top left, Quit Process. The MySQL process is now completely stopped.

Go back to XAMPP and restart your MySQL Database server. It should be green.

Solution 2:

This is for advanced users, we will use the Terminal application on the Mac. For this, you have to know what the process ID is for your MySQL server. If you do not know how to use Terminal, DO NOT USE this solution! You can seriously mess up your Mac if you type in the wrong thing, even by a little bit. Don't call me if this happens, hehe, I warned ya.

This is the same solution as above, just a backend sort of way. Sometimes hackers can't help but go that way. :)

Open Terminal, find it in Finder » Applications » Utilities » Terminal.


sudo su

This opens up the permission to do things. Enter your computer password after. You will not see anything typing/moving as you enter it.

Now type:

ps aux | grep mysql

This opens up information about your MySQL, including your process ID, which you need. It is the first number after _mysql, such as:

_mysql         13013      0.0  2.5  2629880 106096   ??  S    12:17PM

Now you can kill something! Kill the process by using this syntax: kill -9 {your process id}. Mine at this time is number 13013 so it should resemble this that you type:

kill -9 13013

PLEASE use your own number. Again, who knows what happens if you type the wrong number. You might kill an important process that your computer needs to run, or you may mess something up with the mysql service.

Go back to XAMPP and restart your MySQL Database server. It should be green.

Solution 3:

It's not a specific solution, but sometimes if you're running MySQL Database and another program that needs the same port as MySQL Database, which is port 3306. Who knows what is using the same port? Mostly items that use the internet will be taking up ports. Try simply quitting some applications (should I take my own advice? hehe) and maybe your server will start up again.

Solution 4:

Just save whatever folders you've created in XAMPP and reinstall the program. This is a final solution, although solution 1 should work. Good luck! Hope everything works out.


+1 #1 Rossy 2014-12-07 03:33
Thx a lot, was googling everywhere and I'm glad I found your blog. Had to force close msql and now everything is back to normal. thx again

Add comment

Security code


Visit Betfair Review