Home  >  Article  >  Database  >  mysql导入.sql文件的两种方式

mysql导入.sql文件的两种方式

WBOY
WBOYOriginal
2016-06-07 15:35:181280browse

方法一: 注意:首先需要把mysql的安装路径放到环境变量的Path中,如:C:\Program Files\MySQL\MySQL Server 5.5\bin; 1 开始程序输入cmd命令进入dos窗口 2 输入mysql -u root -p 3 输入密码 4 输入source 文件路径加文件名(扩展名加上) 方法二: 先打开cmd再

方法一:
注意:首先需要把mysql的安装路径放到环境变量的Path中,如:C:\Program Files\MySQL\MySQL Server 5.5\bin;
1 开始程序输入"cmd"命令进入dos窗口
2 输入"mysql -u root -p"
3 输入密码
4 输入"source 文件路径加文件名(扩展名加上)"


方法二:
先打开cmd再进入mysql的bin目录:
cd D:\soft\wamp\bin\mysql\mysql5.0.51b\bin  回车
mysql -u 用户名 -p 密码   回车
use 要导入的数据库;
source d:\abc.sql  (指向你自己的目录)回车

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