我正在尝试运行sequelize-cli,特别是npx sequelize db:migrate
。
我已经在config/config.js
中创建了一个配置文件,看起来像这样(显然具有正确的凭据):
module.exports = {
development: {
username: "USER",
password: "PASSWORD",
database: "DB_NAME",
host: "HOST.net",
dialect: 'mssql',
dialectOptions: {
encrypt: "true" // bool - true - doesn't work either
}
}
};
但是我收到以下错误:
ERROR: Server requires encryption, set 'encrypt' config option to true.
正如您从我的配置中看到的那样,我相信我已将crypto设置为true。这就是我对如何从the docs设置此选项的理解。
如何成功将encrypt
设置为true?
答案 0 :(得分:2)
这应该可以解决问题,
module.exports = {
development: {
username: "USER",
password: "PASSWORD",
database: "DB_NAME",
host: "HOST.net",
dialect: 'mssql',
dialectOptions: {
options: {
encrypt: true
}
}
}
};