Thursday, June 15, 2023

Access denied for user 'user'@'hostname' (using password: YES) in mysql8

 Error : Access denied for user 'user'@'hostname' (using password: YES) in mysql8

Mysql version is Mysql8

OS is Ubuntu 22

I am sure that i can connect from my both apps servers to the DB from the command shell.

The issue is the mysql user password. In my password, i had some special characters. When we input this password in command prompt, in bash shell it will work. But its not working from nodejs code (.env file)

Solution :

I change the password without a special character and the issue got fixed.