I have a Nuxt 3 Application running on my account but couldn’t connect to my mysql server
I have mysql setup, and I am able to connect through adminer but using the same login variables gives the following error
getaddrinfo ENOTFOUND inidzdb:3306
I have a Nuxt 3 Application running on my account but couldn’t connect to my mysql server
I have mysql setup, and I am able to connect through adminer but using the same login variables gives the following error
getaddrinfo ENOTFOUND inidzdb:3306
Hi there,
Thanks for reaching out.
If it’s working from another service, it sounds like MySQL is running correctly, a couple of things to check:
The calling service & MySQL Private Service are in the same region. Cross-region private networking is not currently possible.
Check the connection string details, is the scheme correct? e.g. mysql://user:pass@inidzdb:3306/yourdb
Hope that helps
Alan
Thanks for your response @al_ps. Like you have stated, the calling service & MySQL Private Service are in the same region which is Oregon but yet it won’t connect!
The mysql client I use does not take connection strings instead it takes
parameters:
host:
user:
password:
database:
Ok, thanks for confirming. And the connection string, is that correctly formatted?
Alan
@al_ps, I am using mysql2 as mysql client, it doesn’t take connection string instead, it takes the follow parameters;
host: ‘inidzdb:3306’
user: ‘my username’
password:*************
database:inidzdb
I think the problem is this ‘inidzdb:3306’
The examples I’m seeing of the mysql2 package don’t seem to include the port in the host
attribute. As it’s the default port, have you tried it without?
Alan
Yes. If you’re still having issues, can you share some logs?
Alan
Glad to hear you got it working!
Alan
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.