Using the command prompt, switch to the directory of the binaries of MySQL in the installation of Xampp, usually C:\xampp\mysql\bin: cd C:\xampp\mysql\binĪnd execute the mysql console accesing as root or whatever user you used to have on the installation of Xampp:
Save changes on the file and restart the mysql service and you would be theoretically able to dump the databases now. This will allow you to start MySQL to save the databases that aren't corrupted. # server can't start after pasting the new /mysql/data content # Increment this until the server starts up to a value of 6 if it the
Mysql file after mamp update windows#
To do it, modify the my.cnf (in Windows my.ini at C:/xampp7/mysql/bin) file of MySQL and add 2 new properties namely innodb_file_per_table and innodb_force_recovery in the mysqld block: If the server is unable to start due to corrupt tables in some of your databases, you can force it to start using the recovery of InnoDB. In case that the server is unable to start
Start MySQL serverĪfter pasting the content, start the mysql service from the control panel:
Then, add the content from your server (step 1) without replacing the previously mentioned files and directories. In the local mysql/data folder of XAMPP you will need to delete all the original content except for the following directories (they can't change, so be sure to remove those directories from the data of your server): Add content to local mysql/data folderĪs next you need to create a backup of your mysql/data folder of xampp locally in case that something fails, so you will only need to use the old content of mysql/data and everything will be normal again. Once you have this data, proceed with the next step. This data has a format of folders with the name of every of your databases, inside those folders you will find IDB and FRM files that contain theoretically the data of your databases and you will be able to recover them as long as they aren't corrupted:Ĭreate as well a backup of the original data inside the data folder of Xampp, in case that you want everything to work before starting with this tutorial. We assume that you have all the content of the data folder of mysql that doesn't work in your server and we'll try to restore it. The first step is obviously having a copy of the data folder of MySQL that you want to restore in XAMPP (e.g /var/lib/mysql in Linux). Make a copy of the mysql/data content of your server