Open tony0511 opened 4 years ago
Can you provide more information?
Running into this as well:
My connections to the database work from outside this library. Here's the config that gets passed to mysql.createPool
. Host, user, password and database are the same params as I use in sequelize which works.
{
host: 'localhost',
user: 'admin',
password: 'localdevelopment',
database: 'sentencecollector',
createDatabaseTable: true,
endConnectionOnClose: true,
clearExpired: true,
checkExpirationInterval: 900000,
expiration: 86400000,
connectionLimit: 1,
charset: 'utf8mb4_bin',
schema: {
tableName: 'sessions',
columnNames: { session_id: 'session_id', expires: 'expires', data: 'data' }
}
}
just query this in the mysql connection that you want to connect to or switch to mysql 5.something
ALTER USER 'YOUR USERNAME'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YOUR PASSWORD'
flush privileges;
oh and if this doesnt work remove the @
I am getting the same issue.
I have tried doing it with a user that uses mysql_native_password
, but that is not making any difference.
I ended up making my own mysql connection like this:
just query this in the mysql connection that you want to connect to or switch to mysql 5.something
ALTER USER 'YOUR USERNAME'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YOUR PASSWORD'
flush privileges;
This actually worked for me!!! I ran it in MySQL Workbench and had to remove the @'localhos'
part. After hours if not days trying to figure out why my sessions were not working!!
This is using a MySQL DB on Digital Ocean. Why is this broken? Is it Digital Ocean's problem? Did I configure something wrong in my Ubuntu server setup?
its not broken, in mysql 5.7 passwords are stored differently and that's why that happens i think
This should work now as the package is changed to mysql2.
ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client