Error connect enconnrefused 127.0.0.1:3306

I am trying to connect to my database which is in Mysql workbench but I am unable to connect. Can anyone help me with this fix.

Hey,

Thanks for reaching out.

You’re attempting to connect to a MySQL instance on 127.0.0.1:3306, but it’s likely not running at this address. If you’re running the MySQL instance in another Render service within the same region, you’ll need to use the service slug and port for connection—so, for example, ‘mysql-xyz:3306’.

See https://render.com/docs/deploy-mysql#connecting-to-your-database

Jérémy.
Render Support, UTC+3

But I wanted to connect to the database which is in my local machine which is in mysql workbench. Can you help me how to connect to the database which is in mysql workbench or else I should use database which is in clever cloud platform??

Hey,

But where is your database with its data located? I’m not sure what you’re trying to do here? Deploy a MySQL database and a MySQL workbench instance? Where does your database lives? Locally? Then a Render instance wouldn’t be able to connect to it unless it’s accessible through the public internet or the Render internal network.

Also, if you deploy a MySQL database on Render, you’d need to make sure that the data is saved on a disk to persist it across deploys.

Jérémy.
Render Support, UTC+3

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