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