My apache is running properly but mysql server is showing this error
Error: MySQL shutdown unexpectedly.
[mysql] This may be due to a blocked port, missing dependencies,
[mysql] improper privileges, a crash, or a shutdown by another method.
[mysql] Press the Logs button to view error logs and check
[mysql] the Windows Event Viewer for more clues
[mysql] If you need more help, copy and post this
[mysql] entire log window on the forums
I tried deleting ibdata1, ib_logfile0, ib_logfile1, ib_logfile101 files, but it didn’t workout. Help me to solve this problem.
3
Answers
We could use this information to help you out.
Possibilties:
incorect config – try to restore some known good config
blocked port – quite often its skype(especially older versions of skype), try changing MySQL port
I have faced the same issues today.
Solution:
Stop the Apache Service, then
Copy all files from xamppmysqlbackup, and paste all files inside xamppmysqldata.
Start Apache
…and MySQL is working perfectly.
I faced the same problem.
But it didn’t work even after copying all files from xamppmysqlbackup, and pasting them inside xamppmysqldata Or when I deleted ibdata1 file.
So, I went through this link.
Free the port number
Stop your Apache module in xampp control panel.
Open command prompt and Run as Administrator
Type “netstat -ano” in the cmd prompt. This will show all the port connections in your network.
Now find your port number and use it in the find string. In my case, it is 3306.
Type “netstat -ano | findstr 3306” in cmd prompt and hit enter.
Find the listening id of 3306. In my case, 5224 is my listening id.
Kill that process id with “taskkill /PID 6204 /F“.
SUCCESS: The process with PID 5224 has been terminated. will be the output.
Restart the xampp Server.
And it worked!