Open shell from from control panel and start mysql with this command:
mysqld –-console –-skip-grant-tables –-skip-external-locking
Open another shell from control panel and repair database with this command:
mysqlcheck -r --databases mysql --use-frm
exit Xampp server
go to your C:xamppmysqldata directory
delete the ibdata1 file
restart xampp server
I also had to delete ib_logfile0 and ib_logfile1 to get it to work
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à!
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
=> Start MySQL from XAMPP control panel
*************************DONT DELETE ibdata1 FILE*************************
Instead, first try using the MySQL backup folder which is included with XAMPP. So do next steps:
Rename folder mysql/data to mysql/data_old
Make a copy of mysql/backup folder and name it as mysql/data
Copy all your database folders from mysql/data_old into mysql/data (except mysql, performance_schema, and phpmyadmin folders)
Copy mysql/data_old/ibdata1 file into mysql/data folder
Start MySQL from XAMPP control panel
And, voilà!
go to Xampp and navigate to xampp/mysql/data directory
delete all files and dir
and paste files in backup directory
Solucion a mysql shutdown