ubuntu reinstall mysql and restore data through .frm.ibd

created at 07-27-2021 views: 3

ubuntu reinstall mysql and restore data through .frm.ibd

mysql storage location:

/var/lib/mysql

mysql table storage location:

drwx------  9 mysql mysql      4096 12月 10 11:08 ./
drwxr-xr-x 77 root  root       4096 11月 10 11:45 ../
-rw-r-----  1 mysql mysql        56 9月  26 10:35 auto.cnf
drwxr-x---  2 mysql mysql      4096 12月  7 18:48 baike_content/  # My mysql library
drwxr-x---  2 mysql mysql      4096 12月  8 10:44 baike_format/   # My mysql library
-rw-r--r--  1 mysql mysql         0 10月 24 06:56 debian-5.7.flag
-rw-r-----  1 mysql mysql     17494 11月  2 19:26 ib_buffer_pool
-rw-r-----  1 mysql mysql 348127232 12月  8 19:20 ibdata1
-rw-r-----  1 mysql mysql  50331648 12月 10 11:08 ib_logfile0
-rw-r-----  1 mysql mysql  50331648 12月  8 16:22 ib_logfile1
-rw-r-----  1 mysql mysql  12582912 12月 10 11:08 ibtmp1
drwxr-x---  2 mysql mysql      4096 12月  8 19:47 mysql/
-rw-r--r--  1 root  root          6 10月 24 06:56 mysql_upgrade_info
drwxr-x---  2 mysql mysql      4096 10月 24 06:56 performance_schema/
drwxr-x---  2 mysql mysql      4096 11月 22 13:56 resource/
drwxr-x---  2 mysql mysql      4096 12月  6 14:56 resource_new/
drwxr-x---  2 mysql mysql     12288 9月  26 10:35 sys/

Part of the mysql library will be stored in the data folder. If it is still not there, open the folder one by one to see if there are files of .frm and .ibd in the folder.

 m
created at:07-27-2021
edited at: 07-27-2021: