我尝试通过wampserver将我的yyy.sql文件(一个大文件)导入xxx数据库。我将yyy.sql文件复制到C:盘,并通过mysql控制台mysql>使用xxx mysql>source C:\yyy.sql
当我执行这些命令时,它似乎在读取每一行。之后,它给出mysql>,当我检查xxx数据库时,它显示为空。怎么了?
发布于 2014-10-11 10:34:00
选项1; PHPMyAdmin
1. left click wamp -> phpmyadmin
2. select database then click import (top right)
3. locate the database and click go.选项2;使用命令行执行。
在WAMP中,使用命令行将sql文件导入数据库的最简单方法如下:
1. Open Command Prompt (CMD - DOS) get into the mysql folder, which in my case works like this
C:\> cd C:\wamp\bin\mysql\mysql5.0.51b\bin
2. Then use this command to fire up MySQL
This line basically connects you to the mysql database of your choice.
(-p for password if you have one)
C:\wamp\bin\mysql\mysql5.0.51b\bin> mysql.exe -use databasename -u username -p
3. To make things easier, copy the SQL file into the same folder as mysql.exe, and then run this
mysql> source myfilename.sql;发布于 2015-07-24 16:29:26
选项卡并粘贴内容.....
您已经完成了
https://stackoverflow.com/questions/26310424
复制相似问题