mysql|导入导出相关
命令
导出
导出结构和数据
mysqldump -h{hostname} [-P{port}] -u{username} -p{password} [--default-character-set=charset] database [tablename] > {you file path}
只导出结构
mysqldump -h{hostname} [-P{port}] -u{username} -p{password} [--default-character-set=charset] -d database [tablename] > {you file path}
导入
mysqldump -h{hostname} [-P{port}] -u{username} -p{password} [–default-character-set=charset] database [tablename] < {you file path}