How do I connect to my mysql database?

I am using Go (https://github.com/ShinYinYang/portal2/tree/render/go) and tried

mysql:password@tcp(0.0.0.0:3306)/portal
and
mysql:password@tcp(0.0.0.0:PORT)/portal

and both didn’t work.

The console says “2023/08/14 01:26:29 listen tcp: address tcp/PORT: unknown port”

Hi,

It would depend on where your MySQL instance is provisioned.

If you’re using the MySQL Render example, it would be available on the hostname shown on the Private Service dashboard (under the “Connect” button, top right). Another consideration for a Private Service is that it would need to be in the same account and region as the calling service.

Alan

Cloud instance is in Frankfurt but MySQL instance is in Oregon, what do I do ?

They would need to be in the same region. You would have to recreate one of the services and select the same region as the other.

Alan

Ok thanks

Unrelated but how come it has been taking 20 minutes for deploying and still hasn’t finished ?

As you should see I copied the required text yet it didn’t work again and I got the "listen tcp: address tcp/PORT: unknown port”

Typing up to making the topic go up

So that we can take a look at your account/services feel free to raise a ticket from the “Help” or “Contact Support” links while logged into the Dashboard.

Alan

Ok thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.