MySQL Integration

Connecting MySQL to Retool

1. Get MySQL Details & Whitelist Retool IP Address

You can get your database connection details from whoever set up the database. You'll also need to get them to whitelist the Retool IP address.

2. Add to Retool

Create a new resource in Retool, and select "MySQL" as the type.

Enter your database connection details.

3. Create Queries

You can now select your newly-created MySQL resource from the Resource dropdown when creating queries in your Retool apps. You can toggle between SQL mode for raw SQL statements or the GUI mode for structured writes.

You can display the results of MySQL queries as with any other query in Retool:

❗️

Query timeouts

If your queries time out at 60 seconds instead of 120 seconds, the MySQL database might be terminating the connection because nothing is being written. The timeout value is set using the new_write_timeout variable. You can check the value of this variable with a raw SQL query: show variables like 'net_write_timeout'.