Use MySQL Workbench, HeidiSQL or another tool on your computer to work with your database.
Websites hosted with Twerple connect to their database with localhost, and that never needs changing. This article is only for connecting from your own computer or another server.
Option 1: an SSH tunnel (recommended)
If your plan includes SSH, a tunnel is the safest method, because your database is never opened to the internet.
- Find your SSH details in Tools → SSH Access in HostPanel.
- In your database tool, choose a connection over SSH. MySQL Workbench calls it Standard TCP/IP over SSH; HeidiSQL calls it SSH tunnel.
- Enter your SSH host, port, user name and password or key.
- For the database itself, use host
localhost, port3306, and your database user name and password.
Or create the tunnel yourself in a terminal and connect your tool to 127.0.0.1, port 3306:
ssh -L 3306:localhost:3306 username@your-server-ip -p 22
Option 2: allow your IP address
- Find your computer's public IP address, for example by searching "what is my IP".
- In HostPanel, go to Databases → Remote MySQL and add that IP address with a description.
- Open a support ticket telling us the IP address, so we can also allow it on the server firewall.
- Connect with your server's IP address as the host, port 3306, and your database user name and password.
Always add a single IP address. Never use %, which would let the whole internet try to sign in to your database.