XAMPP - MySQL shutdown unexpectedly

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

    I solved similar MySQL error & I think this answer will help you to fix the same type of MySQL database error.

    Solution:

    • Go to the “data” directory in the mysql database.
    • I installed XAMPP on D: drive on my computer & the mysql “data” directory location of my computer was “D:\xampp\mysql\data\”. You may have different location.

    Take Backup of MySQL “data” Folder

    • First of all you should create a backup of the “data” folder using any compression software.

    • Give a name like “data_backup.zip” or any type of compression you wish.

    • I used winrar compression software to compress & backup mysql “data” folder.

    Rename the “data” folder

    • Rename the “data” folder to “data-oldfiles”. This is very important to rename the data directory to any new directory name.

    Create a new “data” folder

    • Create a new folder and give the folder name as “data“
    • To solve the problem we need to create a new “data” directory in the mysql database.

    Copy content from “backup” folder

    • Go to the “backup” folder and copy all files.
    • Paste the files from backup folder to data folder
    • Now start the MySQL database from XAMPP.
    • Your MySQL database will start properly without showing any error.

    Transfer all MySQL projects Database, Data file & Log files

    • If you have many database which was used for various projects, then you have to transfer all database from “data-oldfiles” folder to “data” folder.

    • Copy all databases from the data-old files and paste to the data folder.

    • Now you have to copy the data file “ibdata1” & all log files “ib_logfile0, ib_logfile1 ” from data-old files folder to the data folder.

    • If you have many id_logiles then copied all of them.

    • Now Start MySQL from XAMPP.

    • Go to phpMyAdmin to check all databases are available & working.

    • Now start your any website project from localhost to check the MySQL database.

    The Problem is solved !!

    • Now you will see the problem is solved and the error message “Error: MySQL shutdown unexpectedly.” will not show again.
    • If you have any question on this issue please feel free to ask any question in the comments section.

    You can read the details tutorials on the link bellow: Error: MySQL shutdown unexpectedly – Solution in 5 easy steps

    You can also watch video tutorials to solve the problem:

    [Solved] Error: MySQL shutdown unexpectedly

提交回复
热议问题