Cant connect to mysql 8 #3894
-
Ubuntu Mysql Version Node Version Npm Version Core Package Version Tried both npm package Error received Hi guys, above is the details error that i received when trying to connect with my adonisjs application. In my local seems to be working but not to avail in my ubuntu server. This db user somehow can connect using both cli and other PHP(Laravel) project but not working when it comes to nodejs app. I've created 2 users with different
And this using default:
Have tried these two config but results also same:
The only different is when i try to connect to mysql using Is there anything that i missed for adonisjs config? These solutions seems not working in my case |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @metallurgical! 👋🏻 You have to use Looking at the error message, it seems you have not defined your environment variable correctly. Also, note that if your password has a |
Beta Was this translation helpful? Give feedback.
-
@RomainLanz Already use mysql2. How can i missed the |
Beta Was this translation helpful? Give feedback.
Hey @metallurgical! 👋🏻
You have to use
mysql2
to use MySQL 8.Looking at the error message, it seems you have not defined your environment variable correctly.
Have you tried to connect to your server using any other software with the user you created?
Also, note that if your password has a
$
, you have to escape it.