Summary of mysql data backup problems

1. When backing up database files, pay attention to backing up the structure and data at the same time.
2. When importing backup data, the problem of too large data is often encountered. There are some solutions. A blogger I received at the time wrote it so well that I forgot. Added later.
3. When backing up, pay attention to deleting and batch inserting data. If there is no deleted statement, if the original data in the target database is not deleted, a primary key conflict error will be reported. Bulk insert statements are not created, um, you can try. (1 million pieces of data, after 1 hour of transmission, an error was reported at the end. Come out and say, mmp)
4. If there are foreign keys in the table when backing up data, there may be problems when importing. Since my table interface is not very complicated, my processing method is to release the foreign key in the table first, and then add it. But there must be other simple ways. If you are interested, you can find it yourself.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325648172&siteId=291194637