Linux-6.5 based on MySQL command line mode backup data methods

Source: Internet
Author: User
Detailed description of data backup methods based on MySQL command line mode in Linux-6.5

Understanding:

Logical backup: only backup some data in the table that meets the price adjustment, not all data. However, the unique difference is that text information is exported, which obviously saves space than mysqldump, which is beyond doubt; but the database table itself cannot be created. We cannot guarantee accuracy;

Therefore, mysqldump is easy to use. It is used only when you back up some rows of the table, and even when you back up some rows and some fields.

Format: SELECT clause into outfile ''load DATA infile' into table tb_name
1. connect to MySQL:
2. check that all Gender in the students table is M exported:

3. run this command to import/tmp:

4. view the stu.txt text in/tmp:

5. create a table with the same structure as the students table:

6. view the table structure:

7. Note that no data is inserted at this time:

8. import the stu.txt text under/tmp:

9. check whether the data in the table is imported:



10. if you have other backup tools, go left and check the configuration analysis of mysqldump, innobackupex, and LVM snapshots:

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.