簡體   English   中英

從mysql備份文件導入數據時出錯

[英]Error while import data from mysql backup file

Using mysqldump npm module.While import the backfile generated using this npm.Get this error.

var mysqlDump = require('mysqldump');

mysqlDump({
    host: 'localhost',
    user: 'root',
    password: '',
    database: 'test',
    tables:[], // only these tables
    dest:'./data.sql' // destination file
},function(err){
    // create data.sql file;
})

錯誤:

“ 11:28:40還原C:\\ Users \\ xxxx \\ Documents \\ dumps \\ xx24052018.sql運行:mysql.exe --defaults-file =“ c:\\ users \\ xxx \\ appdata \\ local \\ temp \\ tmptdzvot.cnf” --protocol = tcp --host = localhost --user = root --port = 3306 --default-character-set = utf8 --comments <“ C:\\ Users \\ xxxx \\ Documents \\ dumps \\ xxxx24052018.sql”錯誤第1行的1046(3D000):未選擇數據庫

 Operation failed with exitcode 1 11:28:41 Import of C:\\Users\\xxxx\\Documents\\dumps\\xxxx24052018.sql has finished with 1 errors" 

錯誤說

沒有選擇數據庫

您確定所有數據庫設置嗎?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM