MySQL Backup and recovery

Source: Internet
Author: User
Tags mysql backup

[[email protected] ~]# mysqldump-uroot-p654321 discuz >/data/discuz.sql//Backup Discuz Library
[[email protected] ~]# mysql-uroot-p654321 Discuz </data/discuz.sql//Recovery Discuz Library


2. Back up and restore the Pre_forum_post table in the Discuz library

pre_forum_post >/data/post.sql
[[email protected] ~]# mysql-uroot-p654321 Discuz </data/post.sql//restore without table name


3. Specify the character set when backing up and restoring

Sometimes there is a problem with the character set of the backup file when it comes to recovery, then we need to specify the character set (Gbk,utf8, etc.)

--default-character-set=gbk -p654321 discuz pre_forum_post >/data/post.sql
--DEFAULT-CHARACTER-SET=GBK -p654321 discuz </data/post.sql


This article is from "Linux rookie" blog, please be sure to keep this source http://490617581.blog.51cto.com/11186315/1759047

MySQL Backup and recovery

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.