gpt4 book ai didi

mysql - 从mysql备份文件导入数据时出错

转载 作者:行者123 更新时间:2023-11-29 17:32:52 26 4
gpt4 key购买 nike

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;
})

Error :

"11:28:40 Restoring C:\Users\xxxx\Documents\dumps\xx24052018.sql Running: 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" ERROR 1046 (3D000) at line 1: No database selected

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

最佳答案

错误提示

No database selected

您确定所有数据库设置吗?

关于mysql - 从mysql备份文件导入数据时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50502238/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com