How to connect to MySQL remotely with MySQL Workbench

This guide covers Remote MySQL Access on Hostnil hosting packages that use our custom control panel. You can use MySQL Workbench on your computer to work with a hosted database. First allow your connection IP, then configure Workbench with the remote connection details.

Before you start #

Have your database credentials ready and install MySQL Workbench. Open the hosting control panel for the package that contains your database.

Allow your connection IP #

  1. In the package dashboard, find Web Tools and open Remote MySQL Access.
  2. Under Add Access Host, select the database user.
  3. Check the prefilled IP address. It must match the public IP of the computer or server that will connect.
  4. Click Add Host and keep the resulting connection details open.

We recommend allowing a specific IP. The wildcard % permits connections from any IP; avoid using it as a routine fix.

For remote connections, use mysql.sg.stackcp.com as the hostname and the generated port shown on your Remote MySQL Access page. Do not substitute your website’s internal database hostname.

Set up MySQL Workbench #

Click the + beside MySQL Connections on the home screen to create a connection. This opens the new connection form.

Fill in these fields:

Field Value
Connection Name A recognisable label, such as Hostnil Database
Connection Method Standard TCP/IP
Hostname mysql.sg.stackcp.com
Port The generated port shown on the remote access page
Username The database username shown on your Remote MySQL Access page
Password Your database password
Default Schema Leave blank initially, or enter your database name

Workbench normally starts with port 3306; replace it with your assigned remote port. Your client area or hosting panel password is not the database password.

You can save the password using Store in Vault, or enter it when prompted. Select Test Connection. After a successful test, save the connection and open it from the home screen. See the Workbench connection settings for field definitions.

If the connection fails #

These checks can help narrow down the cause:

  • Timeout or connection refused: Recheck the remote hostname and assigned port, then check whether your network permits outgoing connections to that port.
  • Access denied: Recheck the selected database user and its password, and confirm that remote access was added for that user.
  • Stopped working after changing networks: Compare your current public IP with the allowed IP. Switching Wi-Fi, mobile data or VPN may require updating the access entry.

If you need help, send Hostnil Support the exact error, database name, remote hostname, port and your connection IP. Keep passwords out of screenshots and messages.

Updated on September 13, 2026