Uk2 Logo

Knowledgebase

Back to Working with a Database

Connecting To MySQL Remotely


If you're a UK2 customer looking to manage your databases with advanced tools like MySQL Workbench, this article will guide you through the process of connecting to a UK2-hosted database using Remote MySQL Access. While the integrated phpMyAdmin tool is available, using remote SQL can provide you with additional features and robustness for efficient database management.


Configuring Remote MySQL Access

  • Login to StackCP by following this guide

  • Scroll down to the Web Tools section and click on the Remote MySQL Access Icon.


  • Under Add Access Host , choose the database user you want to connect to remotely from the dropdown menu.

  • Enter the IP address from which you'll be connecting. The current IP address is added automatically, but you can customize it or use % as a wildcard to whitelist all IP addresses.

  • Click Add Host

Your remote MySQL credentials have now been created. Remember, for remote connections, always use mysql.gb.stackcp.com as the hostname, not the standard database hostname.


Connecting with MySQL Workbench

  1. Open MySQL Workbench and go to the Database menu.
  2. Select Manage Connections and provide a name for your connection in the 'Connection Name' field.
  3. In the Hostname field, enter "mysql.gb.stackcp.com."
  4. Enter the port number generated on the Remote SQL Access page in StackCP.
  5. The username is the database name , which can also be found on the same StackCP page.
  6. Add the database password to MySQL Workbench by clicking Store in Vault.
  7. Click Test Connection to ensure everything is configured correctly. You should see a success message.


Related Articles

How To Use PHPMyAdmin
How To Backup Your Database
Importing MySQL Databases In SSH / WP CLI
How to create MySL Databases
How to fix the "Error Establishing Database Connection" in WordPress

Can’t Find what you need?

No worries, Our experts are here to help.