MySQL Databases may sometimes encounter data faults. This requires us to back up the MySQL database and restore the database. The following describes how to back up the MySQL database for your reference.
1. ib_logfile0 and ib_logfile1 are the log files used by mysql to store operation execution, and are used for temporary transaction storage and rollback. When copying the ibdata1 data file to the new mysql, if the two log files are not copied, the startup will fail. In the. err File
InnoDB: Your database may be created upt or you may have copied the InnoDB
Log files cannot be identified
Perform the following operations to restore and restore the database:
Command Line startup:
1. Enter the bin directory mysqld-nt -- innodb_force_recovery = 4 // start data in read-only mode
Then leave the window empty.
2 MySQL Database Backup
Mysqldump-u **-p ** -- opt -- add-drop-table youdatabase> backupfilepath
3. delete a database
Drop database thedatabase
4. log out of mysql and end the mysql process.
5. delete several files except the directories under the mysql data DIRECTORY,
6. Restart mysql mysqld.
7. create database youdatabase
8. Restore mysql-u **-p ** yourdatabase <backupfilepath
Troubleshooting of MySQL query timeout
How to delete duplicate records in MySQL
About MySQL query Cache Mechanism
Use MySQL temporary tables to accelerate queries
Five common MySQL Log types