Open shell fromfrom control panel andstart mysql with this command:
mysqld –-console –-skip-grant-tables –-skip-external-locking
Open another shell from control panel and repair databasewith this command:
mysqlcheck -r --databases mysql --use-frm
So, before deleting files,first try todo what the error message in XAMPP
message panel recommend you todo,using the MySQL backup folder which is
included with XAMPP. So do the next:
Rename the folder mysql/datato mysql/data_old (you can useany name)Create a new folder mysql/data
Copy the content that resides in mysql/backupto the new mysql/data folder
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)
Finally copy the ibdata1 filefrom mysql/data_old andreplace it inside
mysql/data folder
Start MySQL from XAMPP control panel
And, voilà.Nodatabases lost,no ports changed,no run as administrator,noforce recovery,nokill mysqld process,no restoring from previous versions,no more errors.
Instead,first try using the MySQL backup folder which is included with XAMPP. So donext steps:
Rename folder mysql/datato 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 fileinto mysql/data folder
Start MySQL from XAMPP control panel
exit Xampp server
go to your C:xamppmysqldata directory
delete the ibdata1 file
restart xampp server
I also had todelete ib_logfile0 and ib_logfile1 to get it towork
Instead,first try using the MySQL backup folder which is included with XAMPP. So do the next:
1.Rename the folder mysql/datato mysql/data_old (you can useany name)2.Create a new folder mysql/data3.Copy the content that resides in mysql/backupto 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 filefrom mysql/data_old andreplace it inside mysql/data folder
6.Start MySQL from XAMPP control panel
And, voilà!
1_ Rename the folder mysql/datato mysql/data_old (you can useany name)2_ Create a new folder mysql/data3_ Copy the content that resides in mysql/backupto 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 filefrom mysql/data_old andreplace it inside mysql/data folder
=>Start MySQL from XAMPP control panel
*************************DONT DELETE ibdata1 FILE*************************
IMPORTANT: doNOTdelete ibdata1 file. You could destroy all your databases.
Instead,first try using the MySQL backup folder which is included with XAMPP. So donext steps:
Rename folder mysql/datato 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 fileinto mysql/data folder
Start MySQL from XAMPP control panel
How to solve "Error: MySQL shutdown unexpectedly"?
Instead,first try using the MySQL backup folder which is included with XAMPP. So donext steps:
Rename folder mysql/datato 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 fileinto mysql/data folder
Start MySQL from XAMPP control panel
And, voilà!