Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
db:mysql:engines:innodb [2016/10/22 15:32] mirocowdb:mysql:engines:innodb [2016/10/22 15:34] (текущий) – [Восстановление таблиц] mirocow
Строка 30: Строка 30:
  
 ===== Восстановление таблиц ===== ===== Восстановление таблиц =====
- 
- 
-[[restore|Восстановление]] 
  
   * ibdata1: By default all data and indexes for all tables/databases is stored in a single, shared file: ibdata1. idbata1 does not shrink. If rows are deleted, space will be reclaimed by new rows, but the file will only grow in size.   * ibdata1: By default all data and indexes for all tables/databases is stored in a single, shared file: ibdata1. idbata1 does not shrink. If rows are deleted, space will be reclaimed by new rows, but the file will only grow in size.
Строка 38: Строка 35:
   * tablename.frm: Each table has a small *.frm file in the database-specific directory which stores the table definition.   * tablename.frm: Each table has a small *.frm file in the database-specific directory which stores the table definition.
  
 +==== Этапы восстановление ====
 +
 +  - Create empty InnoDB tablespace (remove existing ibdata1, ib_logfile* and start MySQL).
 +  - Enable innodb_file_per_table
 +  - Create tables you want to connect
 +  - Compile ibdconnect from Percona InnoDB Recovery Tool and run ./ibdconnect -o ibdata1 -f t1.ibd -d <your database> -t <table name, t1 in this case> for each table.
 +  - Then fix checksums in ibdata1 as described in the post
 +  - Copy new ibdata1 and all your *.ibd files to the datadir.
 +  - Start MySQL and take a dump of the tables.