Full backup of MYSLDUMP data + Incremental backup + failed recovery

Source: Internet
Author: User
Tags flush backup linux

Learn a few days of MySQL knowledge. Just get in touch with a command that is simply a grammar. But when there is a problem, I don't know where to begin. It is still not practical to find the relevant information on the Internet. So I began to summarize the backup and restore examples. This article is used by mysqldump. 2 case operations were performed. Of course two cases are very similar. The second one expands for the first one. If you figure out the principles of these 2 examples. The next step is to perform an LVM backup restore and Xtrabackup This backup tool will be much easier.

How MySQL is backed up

Prerequisite: In advance to ensure that the backup type, backup strategy, such as MySQL common knowledge is clear.

Mysqldump: Logical Backup tool

Example one, we created a small educational management system, only in MySQL, there is a Jiaowu table, we have a backup of this database + incremental backup + restore

Mysqldump (full backup) + binary log

Preparation: Open 2 Linux connection windows in Xshell (mainly for lock table operations), we assign them to numbers for easy instructions, and if there is no Xshell tool, you can use screen in Linux. Specific use can search screen, we mainly talk about backup.

First of all, in 1 to the MySQL lock table operation

[root@localhost ~]# mysql     
mysql> FLUSH TABLES with READ LOCK; # #以只读的方式进行锁表     
mysql> FLUSH;       # #滚动日志     
mysql> show BINARY LOGS; # #查看

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.