XAMPP - MySQL shutdown unexpectedly

前端 未结 30 1709
长情又很酷
长情又很酷 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:18

    first of all, make a backup file of your database C:\xampp\mysql\data copy this file and past it somewhere in your pc. After this open, the data file and also open the XAMPP server try to delete the files step by step one by one after deleting each file try to run the MySQL server after deleting a single file as shown in the screenshot thus your databases won't delete. if the file deletion does not work then try to copy the same files from the backup folders and repeat this until it works... this is time taking but this worked for me I have solved this in 20 minutes.

    0 讨论(0)
  • 2020-11-22 10:19
    1. Go to mysql/data/
    2. Delete all random files (except the actual database folders)
    3. Restart Apache and MySQL.

    It should fix it.

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

    If the answers mentioned above are not working, you can try deleting all the files in data, except for the folder

    Goto: C:\xampp\mysql\data

    After that: Goto: C:\xampp\mysql\bin

    then open with notepad my.ini , Its look like this.

    Then delete or put into comment the port 3306 and change it to 8111 then run xamp with administrator and its work well.

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

    When you're not running XAMPP as an administrator, shutting down MySQL frequently causes corruption which means you have to repair or delete your tables. To avoid this you need to either run XAMPP as an administrator, or use the proper command prompt method for shutting down MySQL.

    You can delete ibdata1 as Kratos suggests, but this can leave you with a broken database as other pieces of your database are still in the /mysql/data/ folder. In my case, this residual data stopped me successfully installing WordPress.

    A cleaner way of undoing the damage is to revert your whole /mysql/data/ folder. Windows has built-in folder versioning — right click on /mysql/data/ and select Restore previous versions. You can then delete the current contents of the folder and replace it with the older version's contents.

    Addendum: To ensure that you don't forget to run XAMPP as an administrator you can right click the XAMPP shortcut, go to Properties, then Advanced, and finally tick Run as administrator.

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

    Add the following line below the [mysqld] section in the mysql config file (my.ini) and restart the apache web server and the mysql service afterwards.

    [mysqld]
    innodb_force_recovery = 4
    
    0 讨论(0)
  • 2020-11-22 10:21

    I have resolved the problem by ending the task for mysqlid on Task Manager.

    0 讨论(0)
提交回复
热议问题