Home > Database > Mysql Tutorial > mysqldump使用经验

mysqldump使用经验

WBOY
Release: 2016-06-07 16:15:36
Original
989 people have browsed it

mysqldump使用心得 一、启用gtid时,部分库、表导出时,需要添加--set-gtid-purged=off选项。在导出的文件中,添加set global gtid_purged='xxx'仅对全库导出有意义。 mysqldump -u root -P 3309 --set-gtid-purged=off jason3 d:\study\mysql\apple\db_jason

mysqldump使用心得
一、启用gtid时,部分库、表导出时,需要添加--set-gtid-purged=off选项。在导出的文件中,添加set global gtid_purged='xxx'仅对全库导出有意义。
mysqldump -u root -P 3309 --set-gtid-purged=off jason3 > d:\study\mysql\apple\db_jason.sql
Copy after login

二、导出表中部分数据时,可以使用--where选项。该选项的内容,将添加在'select * from where '之后。因此,where条件语句、order by语句及limit语句都可以指定在该选项中。
mysqldump -u root -P 3309 --set-gtid-purged=off --where="1=1 limit 0,5" --all-databases > d:\study\mysql\apple\db_jason_all.sql
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template