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)
1. Environmental Description (1) CentOS-7-x86_64,...
HTML 4 HTML (not XHTML), MIME type is text/html, ...
MySQL database too many connections This error ob...
This article shares the specific code of Vue usin...
background A few days ago, when I was doing pagin...
Preface MySQL supports multi-threaded replication...
Effect: Ideas: Use the input type attribute to di...
Preface I have read many similar articles before,...
When executing yum in dockerfile or in the contai...
KVM stands for Kernel-based Virtual Machine, whic...
text 1) Download the Ubuntu image docker pull ubu...
Docker installs mysql docker search mysql Search ...
RocketMQ is a distributed, queue-based messaging ...
1. Docker pull pulls the image When using $ docke...
MySQL executes SQL through the process of SQL par...