oooxxx I deployed a Node.js service on s5.serv00.com, which connects to MySQL on mysql5.serv00.com. I encountered the following error: Error: Access denied for user 'm3143'@'com.serv00.s5.devil' (using password: YES). When I SSH into the machine and run mysql -h mysql5.serv00.com -P 3306 -u m3143 -p 'mysql_database', I can successfully connect and query the data. What could be the issue?
admin oooxxx Check the provided data, such as the database name, database user, and password. If the MySQL database user's password contains special characters, verify whether they are causing issues for your application.
oooxxx admin Yes, you are right. The issue lies with the password; it contains a #, and when using the dotenv module to read it, the content after the # is ignored, so the MySQL password is incorrect. Thank you for your help.