mysqldump
mysqldump -u root -d -R --add-drop-table basedata >basedata.sql
-d只有表结构即列信息,无内容即行信息
· --no-data, -d
Do not write any table row information (that is, do not dump table contents). This is
useful if you want to dump only the CREATE TABLE statement for the table (for example,
to create an empty copy of the table by loading the dump file).
· --routines, -R
Include stored routines (procedures and functions) for the dumped databases in the
output. Use of this option requires the SELECT privilege for the mysql.proc table. The
output generated by using --routines contains CREATE PROCEDURE and CREATE FUNCTION
statements to re-create the routines. However, these statements do not include
attributes such as the routine creation and modification timestamps. This means that
when the routines are reloaded, they will be created with the timestamps equal to the
reload time.
原标题:mysql命令行工具
关键词:MYSQL