Home > Database > Mysql Tutorial > mysql只导出表结构或数据_MySQL

mysql只导出表结构或数据_MySQL

WBOY
Release: 2016-06-01 13:02:01
Original
1014 people have browsed it

只导数据不导结构

mysqldump -t 数据库名 -uroot -p > xxx.sql

只导结构不导数据

mysqldump --opt -d 数据库名 -u -p > xxx.sql

导出数据和表结构

mysqldump 数据库名 -uroot -p > xxx.sql

导出特定表结构

mysqldump -uroot -p -B 数据库名 --table 表名 > xxx.sql

导入数据

source /tmp/xxx.sql

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