將.sql文件導入到mysql


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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章