0

Today i tried to run MySQL in localhost ,but shutdown immediately.

Error: MySQL shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method. Press the Logs button to view error logs and check the Windows Event Viewer for more clues If you need more help, copy and post this entire log window on the forums

I really cant find the issue.

1
  • Open MySQL data folder and delete files starting with ib Commented Apr 30, 2020 at 21:21

1 Answer 1

0

This error is occurring because the default port that MySQL uses(3306) has been already taken by another task. in that case you can kill the running PID and start it again.

Solution 1:

taskkill /pid <port>

Steps:

  1. Go to netstat and find the PID for MySQL.
  2. Kill the PID in the command prompt using the command that is mentioned above.
  3. Then start mysql again.

The highlighted one is the PID

Solution 2:

  1. exit Xampp server

  2. go to your C:\xampp\mysql\data directory

  3. delete the ibdata1 file

  4. restart xampp server

    I hope this will solve your issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.