Home > Database > Mysql Tutorial > 从mysql中导出单个表结构和数据_MySQL

从mysql中导出单个表结构和数据_MySQL

WBOY
Release: 2016-06-01 13:48:40
Original
1243 people have browsed it

bitsCN.com

mysqldump -u用户名 -p密码 -P端口号  --database 数据库名 --tables 表名> c:/导出文件名.sql

1、其中参数-P可以省略除非你的端口号不是mysql默认端口号

2、如果不写--tables参数就是导出去该DB中的全部表数据

 

1)MYSQL连接命令:
mysql -h主机地址 -u用户名 -p用户密码

2)显示数据库列表:
show databases;

3)显示数据库列表:
show databases;

4)显示数据表列表:
   show tables;

5)显示数据表的结构:
   describe 表名;

bitsCN.com
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