Я не могу подключиться к mysql с помощью sequelize, я не могу установить соединение с сервером mysql (версия mysql - 8).
выдает мне эту ошибку, которую я не могу решить, даже глядяв интернете. Я использую базу данных mysql, предоставленную digitalocean
const Sequelize = require('sequelize');
const fs = require('fs')
const sequelize = new Sequelize('defaultdb','user','pass',
{
dialect : 'mysql',
port : '25060',
host: 'db-mysql-fra1-insquare-do-user-6497882-0.db.ondigitalocean.com',
dialectOptions: {
ca : 'fs.readFileSync("ca-certificate.crt").toString()'
}
}
);
module.exports = sequelize;
Connession al DB Error: { SequelizeConnectionError: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Promise.tap.then.catch.err (/root/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:133:19)
at tryCatcher (/root/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/node_modules/bluebird/js/release/promise.js:517:31)
at Promise._settlePromise (/root/node_modules/bluebird/js/release/promise.js:574:18)
at Promise._settlePromise0 (/root/node_modules/bluebird/js/release/promise.js:619:10)
at Promise._settlePromises (/root/node_modules/bluebird/js/release/promise.js:695:18)
at _drainQueueStep (/root/node_modules/bluebird/js/release/async.js:138:12)
at _drainQueue (/root/node_modules/bluebird/js/release/async.js:131:9)
at Async._drainQueues (/root/node_modules/bluebird/js/release/async.js:147:5)
at Immediate.Async.drainQueues (/root/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)
at processImmediate [as _immediateCallback] (timers.js:729:5)