I have a droplet with a docker image hosting Appsmith - a low-code development platform. I want to set up an Appsmith datasource to a MySQL instance on another droplet that is not in the client droplet’s network. I’m not real good at Linux so I definitely need some guidance. I can connect to the server via SSH tunnel from my laptop.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya,
You should be able to do that using a similar approach as to how you would go about when trying to configure access to another MySQL Droplet even when it’s not being inside a docker container.
By default, MySQL is configured to listen for connections only from the local machine. You need to change this so that it can accept connections from your Appsmith droplet.
Also if you do not have a user, create one. Create a user (or use an existing one) and grant privileges. Replace
appsmith_user
,password
, andappsmith_droplet_ip
with appropriate values:If either of your droplets has a firewall enabled, you’ll need to configure it to allow the necessary traffic:
MySQL Server Droplet:
Allow incoming connections on port
3306
(MySQL’s default port) from the Appsmith droplet’s IP address.Using
ufw
(Uncomplicated Firewall) as an example:bashCopy code
sudo ufw allow from appsmith_droplet_ip to any port 3306
Appsmith Droplet:
3306
.