question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to mysql2 package

See original GitHub issue

I got this error while trying to use this package: Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client. I got the same error when using mysql normally in node, and this stack overflow answer led me to try out mysql2 instead. It worked.

I would recommend swapping the mysql dependency in this package over to the mysql2 package instead. That way, issues like this one will be resolved easily.

For now, I am using the less-secure option of changing the authentication method.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
chill117commented, Aug 5, 2021

instead of doing this why don’t you upgrade to mysql2 in your package you just have change one line only.

I don’t have time at the moment to properly vet the mysql2 module. So I would not feel comfortable adding it as a direct dependency.

1reaction
chill117commented, Aug 5, 2021

You can use mysql2 with express-mysql-session without any changes to this module:

var mysql2 = require('mysql2/promise');
var session = require('express-session');
var MySQLStore = require('express-mysql-session')(session);

var options = {
    host: 'localhost',
    port: 3306,
    user: 'db_user',
    password: 'password',
    database: 'db_name'
};

var connection = mysql2.createPool(options);
var sessionStore = new MySQLStore({}/* session store options */, connection);
Read more comments on GitHub >

github_iconTop Results From Across the Web

mysql2 - npm
MySQL2 is free from native bindings and can be installed on Linux, Mac OS or Windows without any issues. npm install --save mysql2....
Read more >
2.11.4 Upgrading MySQL Binary or Package-based ...
An in-place upgrade involves shutting down the old MySQL server, replacing the old MySQL binaries or packages with the new ones, restarting MySQL...
Read more >
How to Check and Upgrade Your MySQL Version Easily - Kinsta
It'll prompt you to choose a version; select 5.7 or 8.0. If you're upgrading from 5.6, you should update to 5.7 first, rather...
Read more >
2.11.7 Upgrading MySQL with the MySQL Yum Repository
As a general rule, to upgrade from one release series to another, go to the next series rather than skipping a series. For...
Read more >
Chapter 2 Installing and Upgrading MySQL
Binary distributions are available in native format for many platforms, such as RPM packages for Linux, DMG packages for Mac OS X, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found