Current location - Health Preservation Learning Network - Healthy weight loss - Mysql ibdata 1 has been deleted. How to recover data?
Mysql ibdata 1 has been deleted. How to recover data?
Yesterday, a friend started binlog on a MySQL instance used by the company, but it failed in the process of starting (he didn't mention the reason for the failure). After the startup failed, he deleted ibdata 1 and ib_logfile. Later, it started normally, but all the tables can be seen through show tables, but it was reported as "Table does not exist" during the selection process.

Therefore, it is suggested that he try transportable tablespaces.

At the same time, I have tested it myself, and it is really feasible.

Beta MySQL 5.6.32 Community Edition

Basic steps of recovery

1. Copy the original data file to another directory.

2. To create a table with the same name, the table structure must be consistent.

3. Export Tablespaces

Mysql & gt change table t DISCA