1 进入mysql的根目录
2 通过php myAdmin或者Dos命令创建一个新的数据库test
3 D:\> mysql -uroot -ppassword 出现如下提示(root是用户名 password是密码)
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 18508 Server version: 5.1.22-rc Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer.4 mysql> use test 如下提示
mysql> source D:\file.sql
5 mysql> source D:\file.sql