Hello! I have a problem with a MySQL database that I haven’t been able to solve no matter how much I tried, either with internet guides or with free tools. I really don’t want to pay hundreds of dollars to a company so please, if anyone knows of a solution, help me because I’m desperate.
I was running XAMPP 7.1.22 where I had said database and I decided to install XAMPP 7.2.10 without backing up the database. After that, the site wasn’t working so I figured the problem was the database. And indeed PHPMyAdmin wouldn’t recognize it. I reinstalled the previous version of XAMPP and the database was there but unfortunately I could only see the tables. The tables themselves were empty though. So no dump procedure worked and neither the site. Now all I have left is the folder with the database which contains all the .frm and the .ibd files, an .opt file, a .myd file and a .myi file. I also have the ibdata1 file.
Any ideas or suggestions? Thank you very much for your time.
What I have tried:
I haven’t been able to solve no matter how much I tried, either with internet guides or with free tools.
解决方案First of stopped my MySQL service using XAMPP’s
then move your files ib* files and the folder containing the *.frm files to the local mysql data folder (C:\Program Files\xampp\mysql\data)
then edit my.cnf (located in C:\Program Files\xampp\mysql\bin)and made the following changes (starting at line 66 or check your file for line ):
OLD:
skip-innodb
#innodb_data_home_dir = C:/Program Files/xampp/mysql/data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:/Program Files/xampp/mysql/data/
#innodb_log_arch_dir = C:/Program Files/xampp/mysql/data/
#set-variable = innodb_buffer_pool_size=16M
#set-variable = innodb_additional_mem_pool_size=2M
#set-variable = innodb_log_file_size=5M
#set-variable = innodb_log_buffer_size=8M
#innodb_flush_log_at_trx_commit=1
#set-variable = innodb_lock_wait_timeout=5
#skip-innodb
innodb_data_home_dir = C:/Program Files/xampp/mysql/data/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = C:/Program Files/xampp/mysql/data/
innodb_log_arch_dir = C:/Program Files/xampp/mysql/data/
set-variable = innodb_buffer_pool_size=16M
set-variable = innodb_additional_mem_pool_size=2M
set-variable = innodb_log_file_size=170M
set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
set-variable = innodb_lock_wait_timeout=50
set innodb_log_file_size to the actual size of my log file then edited the XAMPP batch file that starts the mysql service
(C:\Program Files\xampp\mysql_start.bat)
add –innodb_force_recovery=6 to the end of the call to mysqld.
So line 8 of that file now
mysql\bin\mysqld –defaults-file=mysql\bin\my.cnf –standalone –console –innodb_force_recovery=6
Well after waiting and trying a lot, I decided to roll back the site and add the missing content again. Thanks for your time.