Home > Database > Mysql Tutorial > body text

[MySQL FAQ]系列 -- mysqldump选项之skip-opt

WBOY
Release: 2016-06-07 16:34:58
Original
1680 people have browsed it

最近在用mysqldump备份时,想要把数据表和数据分开备份,因此做了2次备份。 执行备份数据库表结构时,指定了 --skip-opt 选项,相当于禁用下面几个参数: --add-drop-table, --add-locks,--create-options, --quick, --extended-insert,--lock-tables, --set

最近在用mysqldump备份时,想要把数据表和数据分开备份,因此做了2次备份。
执行备份数据库表结构时,指定了 --skip-opt 选项,相当于禁用下面几个参数:

--add-drop-table, --add-locks,
--create-options, --quick, --extended-insert,
--lock-tables, --set-charset, and --disable-keys
Copy after login

选项 --create-option 看起来比较不起眼:

  -a, --create-options 
      Include all MySQL specific create options.
Copy after login

事实上,如果把它disable的话,备份出来的表结构,会少了:

AUTO_INCREMENT   --PK字段的AUTO_INCREMENT属性以及数据表的AUTO_INCREMENT属性都会丢掉
ENGINE=InnoDB DEFAULT CHARSET=utf8  --数据表的引擎、字符集属性
Copy after login

等MySQL特有的数据表属性,需要注意下,版本信息见下:

Server version:         5.5.19-55-log Percona Server (GPL), Release rel24.0, Revision 204
mysqldump --version
mysqldump  Ver 10.13 Distrib 5.5.19, for Linux (x86_64)
Copy after login

技术相关: 

MySQL FAQ

MySQL基础知识

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