0
votes

I have been using Xampp for a few weeks and so far I had no problem in launching MySQL. This time, when I ran Xampp as administrator (as usual), I got this error:

Problem detected! Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" MySQL57"!

I changed the port from 3306 to 3307 in C:\xampp\mysql\bin\my.ini and restarted my computer, and now I get this error:

"Error: MySQL shutdown unexpectedly..."

I found no working solution online, and I would appreciate it if you could help me with this.

This is what I see in the control panel: mysql (xampp) problem

This is mysql_error.log:mysql_error.log

4

4 Answers

1
votes

Try this quick fix:

  1. Close and exit Xampp server / control panel
  2. Go to your C:\xampp\mysql\data\ dir (or where your xampp resides)
  3. Delete ibdata1 file
  4. Restart xampp

Let me know the result.

1
votes

hello i have low ranking that's why i help out through answer

this issue is related to your port configuration because sometime port is allocate by the other application in windwow keep in mind firstly your skype is in logout mode or check their port configuration or 2nd step You can change the port number to 3308 from 3306 in \xampp\mysql\bin\my.ini file. 3rd step : restart your xammp and check and otherwise uninstall and download wamp

0
votes

I don't know if it can helps cause I'm using Wamp (not Xampp), but I must disable Skype before it xan works,

Regards,

Charles

0
votes

I found a very simple solution after all, without having to edit any my.ini files or installing and uninstalling stuff. Just in case someone else faces with this problem, I just used two commands in cmd:

netstat -a -t -n -o|grep 3306

Which tells which program uses port 3306. We just want the PID of the program - say it's 2588 - and then type:

taskkill /pid 2588 /f

I restarted Xampp and it worked.