mysql copies the files in the data directory to restore the dataBackground: MySQL crashed and could not be started. I decided to rebuild the environment, but I forgot to back up the database test data. The MySQL data directory survived. operate: 1. Copy the folder of the test database (including .frm .ibd and other files)2. Restart MySQLWhen viewing a table in the database through Navicat, the result shows "Table 'xxx' does not exist" 3. After searching on Google and Baidu, I found the innodb tableDirectly copying the file is not usable, and it will prompt that the table does not exist. When copying, the ibdata1 file in the data directory should be copied together, and the ib_logfile0, ib_logfile1 and other files should be deleted. mysql migrates the database by copying data files1. Shut down the serviceRun cmd as an administrator and execute the following command: net stop mysql 2. Copy data filesCopy the database file of the data file (no need to copy mysql, performance_schema, sys), and be sure to copy the ibdata1 file 3. Import filesPut the copied file into the data file of the destination database The above is my personal experience. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Search optimization knowledge to pay attention to in web design
>>: Three ways to achieve background blur in CSS3 (summary)
<br />This article is mainly to let beginner...
Note: The system is Ubuntu 14.04LTS, a 32-bit ope...
Table of contents 1. Pull the image 2. Create a l...
This script can satisfy the operations of startin...
This article describes how to use docker to deplo...
<br />Hello everyone! It’s my honor to chat ...
Table of contents MySql8.0 View transaction isola...
Mouse effects require the use of setTimeout to ge...
Library Operations Query 1.SHOW DATABASE; ----Que...
Table of contents 1. Steps to use Jquery: (1) Imp...
Table of contents Introduction to utf8mb4 UTF8 by...
Implementing carousel with a single DOM node You ...
The meaning of key_len In MySQL, you can use expl...
Scenario Description In a certain system, the fun...
Table of contents Using conditional types in gene...