Retool Self hosting with local mysql database

I have found that it's absolutely impossible to self host retool with a local mysql database. I wouldn't say impossible but I have yet to accomplish it so I've given up. I spent an entire week trying to get it to work. I've tried different hosts from 127. to 171. to localhost etc, none work. I've tried all different types of ports and yes they are all open on the firewall's side. I've upgraded both my mysql server and retool itself, no luck. I always either get a TIMEOUT or a CONNECTION REFUSED. I've tried creating multiple different admin accounts for this database as well as entirely new databases with users, I have yet to get a mysql local instance to be able to connect to retool. These same parameters are used in other parts of my main website that needs mysql access so I know for a fact they work.

Can you post a screenshot of your resource configurations (with 127.0.0.1 and localhost), and screenshot of running the status command from mysql terminal?

There is no errors related to retool other than this:

2024-01-31T18:06:53.131124Z 35 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'

which are errors on my end from other applications used. I'm using an account with cashing_sha2_password already because I thought that it may have been causing the errors so I switched over to the type and I'm still getting the errors on Retool, and unable to connect. I've tried straight root connection but it also failed to connect with the TIMEOUT error this time.

@Seager_Cortez I assume you're able to connect to this db locally just fine. Can you clarify which port you used and maybe include a screenshot of your resource configuration (the Retool page for this resource)?

We're able to use Retool internally to connect to localhost database, so I'm inclined to think that it's a configuration error.

I’m using 3306, root for username, password of course and my DB name. And yes I’m able to connect just fine to all of my other resources hosted locally on my server. I run a social network and everything connects just fine. I’ve tried using localhost, 127., 171. address’s for hosts. I use 127.0.0.1 in my other applications, and the accounts are also set to where they can be connected from any IP.

How is your Retool instance deployed? If using docker-compose locally, you typically need to specify host.docker.internal as the hostname to access services running on the local machine.

3 Likes