升级xampp里的mysql数据库,升级到新版本的XAMPP后,从文件中恢复mysql数据库

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值