-
-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to authenticate if tried with node-mysql2 client. It works otherwise #1318
Comments
Hello, same issue with an rds database. |
Similar problem here. In my case, user is being omitted in the message. This is my code for creating the connection: const { createConnection } = require('mysql2');
const { connections } = require('../../config');
const client = createConnection({ ...connections.database });
// This is my database object:
// {
// host: process.env.MAIN_DB_HOST,
// port: process.env.MAIN_DB_PORT,
// database: process.env.APP_DATABASE,
// user: process.env.APP_USER,
// password: process.env.APP_PASSWORD
// } I've placed a breakpoint in this line for debugging and realized that it was being called twice. Now we need to find out why this is happening. Any clues? Extra info
|
Solved my problem! |
A little late to the party, but I was using v3.6.1 and was still running into the same type of issue. I verified my credentials were being loaded correctly and they were. After updating to v3.6.5 where they added #2277 everything works perfectly. Let me know if this helps! |
First rds.amazon.com/docker locale/intl then printenv |
Hello Team,
I am try to connect mysql server with node-mysql2 from remote server. Somehow I am able to connect through mysql cli, but unfortunately can not connect through the script.
Note: Authentication plugin enabled as mysql_native_password and mysql 8.0
This I get when I try to make connection through mysql2
But somehow it can login without any problem from the same remote server with below command.
mysql -h rds.amazon.com -P 3306 -u someuser -p
Any idea what could be the issue?
The text was updated successfully, but these errors were encountered: