Home >Database >Mysql Tutorial >从命令行导入*.sql到服务器_MySQL

从命令行导入*.sql到服务器_MySQL

WBOY
WBOYOriginal
2016-06-01 13:31:22999browse

bitsCN.com


从命令行导入*.sql到服务器

 

记录一下如何从命令行导入*.sql文件到服务器:

 

1.打开cmd(建议以管理员身份);

 

2.登陆mysql;

 

参数-h -u -p

 

3.选择一个数据库;

 

use xxxxxxx;

 

4.mysql>source d:/*.sql;

 

注意:在windows下必须用“/”,Linux没用过不知道是不是可以用“/”;

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