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)
Preface Query optimization is not something that ...
This article shares the specific code of the pull...
Feelings: I am a backend developer. Sometimes when...
One environment Alibaba Cloud Server: CentOS 7.4 ...
MySQL UNION Operator This tutorial introduces the...
The system environment is server2012 1. Download ...
I remember that a few years ago, there was an int...
The operating environment of this tutorial: Windo...
Table of contents Introduction Instructions Actua...
1. Build the basic image of jmeter The Dockerfile...
It is difficult to find good image material websi...
We all know that we can use the mkdir command to ...
2048 mini game, for your reference, the specific ...
Error description When we install Docker Desktop,...
Table of contents 1. Overview 2. Attributes 1. Ma...