Common backup restore of MySQL notes

Source: Internet
Author: User

Backup: Mysqldump-u user-p pwd-h host Dbname[tbname,[tbname ...] >filename.sql---(logical backup)
-q or -quick    ----does not occupy memory-w  "Where clause"  or -where =   where clause     ----conditions--all-databases -----All databases--databases     ------Multiple databases, separated by spaces between databases--skip-opt   -----do not use memory  mysqlhotcopy db_name_1,... db_name_n /path/to/new_directory  --- Cold backup (physical backup) (not for InnoDB)--------------------hot backup is not applicable with MyISAM restore:mysql -u user -p [dbname]< filename.sql source filename.sql  ----Restore cp -r /path/to/new_directory  within the database Database Data Catalog (MYSQL/DATA)  ----Not applicable with InnoDB (cold restore) mysqldump -h www.abc.com -u root -p  dbname |mysql -h www.bcd.com -u root -p ---database migration load data low_ priority infile  "Data.sql"  into table table_name;  --- Insert data from the data file on the original data (server is running)             replace  ----load data  parameter   (indicates that the new row is inserted instead of the original duplicate line)              ignore   ----with replace, (means skipping duplicate rows)

Common backup restore of MySQL notes

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.