[[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