XAMPP - MySQL shutdown unexpectedly

前端 未结 30 1741
长情又很酷
长情又很酷 2020-11-22 09:42

When I open XAMPP and click start MySQL button and it gives me an error. I had started it just before, but now it isn\'t working.

12:19:12 PM [mysql]

相关标签:
30条回答
  • 2020-11-22 10:12

    IMPORTANT Deleting this file may render any existing MySQL data unusable. Use with caution

    Hey I just did this and it worked:

    1. exit Xampp server
    2. go to your C:\xampp\mysql\data directory
    3. delete the ibdata1 file
    4. restart xampp server

    It should work

    0 讨论(0)
  • 2020-11-22 10:13

    Stop there! Please do NOT delete ibdata1 file!

    Deleting this file is like playing a Russian roulette with your databases, it could work and restablish everything, but also, probably could harm every database you have. Instead, first try using the MySQL backup folder which is included with XAMPP. So do the next:

    1. Rename the folder mysql/data to mysql/data_old (you can use any name)
    2. Create a new folder mysql/data
    3. Copy the content that resides in mysql/backup to the new mysql/data folder
    4. Copy all your database folders that are in mysql/data_old to mysql/data (skipping the mysql, performance_schema, and phpmyadmin folders from data_old)
    5. Finally copy the ibdata1 file from mysql/data_old and replace it inside mysql/data folder
    6. Start MySQL from XAMPP control panel

    And, voilà!

    0 讨论(0)
  • 2020-11-22 10:13

    In my case in which I synced my mysql data and htdocs to dropbox, I just needed to delete the conflicted files in mysql/data folder and subfolders. The conflicted files can be identified by its names, dropbox will tell you that. It has solved the problem for me.

    0 讨论(0)
  • 2020-11-22 10:13

    For me, the problem was:

    I used to hibernate my PC instead of shutting down due to the scale of the project. I was lazy enough to reopen all programs.

    Before trying anything else, I recommend you to do the following simple things. Otherwise, you will be messed up your MySQL server.

    1. Open your task manager and End the XAMPP process.
    2. Re-run the XAMPP application as Administrator.

    If not works,

    1. Save all unsaved programs and restart the PC.
    2. Run XAMMP as administrator.

    Also, make sure to check 3306 & 5040 ports. These two ports are required to run MySQL on default settings.

    Check @Ryan Williams answer to find of why it's good to run XAMPP as administrator.

    0 讨论(0)
  • 2020-11-22 10:16

    I also faced this issue and this is how I solved.
    1. Make sure xampp is not under sub-directory. For example, it should be C:\xampp
    2. You might need to run as administrator in running the application.

    Hope this will work!

    0 讨论(0)
  • 2020-11-22 10:17

    My Xampp MySQL worked just follows as below:

    01.Go to mysql/data/ directory
    02. delete the ibdata1 & ib_logfile*(ib_logfile0,ib_logfile1,ib_logfile101) file
    03. restart xampp server
    
    0 讨论(0)
提交回复
热议问题