How to Set Up a Remote MySQL Connection to a StackCP Database

Author:

Published:

Updated on August 15, 2024

Reading Time: 2 min

StackCP Remote MySQL #

If you’re a StackCP customer looking to manage your databases with advanced tools like MySQL Workbench, this guide will help you connect to a StackCP-hosted database using Remote MySQL Access. While the integrated phpMyAdmin tool is available, using remote SQL can provide additional features and robustness for efficient database management with CP CLOUD HOSTING.

Configuring Remote MySQL Access #

  1. Log in to your StackCP control panel:
    • Go to StackCP.
  2. Navigate to Manage Hosting:
    • Select the package where your desired database is located.
  3. Access the Hosting Package Overview:
    • Click on Options and then Manage.
  4. Enable Remote MySQL Access:
    • 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.
  5. Remote MySQL Credentials:
    • 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:
    • Go to the Database menu.
  2. Manage Connections:
    • Select Manage Connections and provide a name for your connection in the Connection Name field.
  3. Enter Connection Details:
    • In the Hostname field, enter mysql.gb.stackcp.com.
    • Enter the port number generated on the Remote SQL Access page in StackCP.
    • The username is the database name, which can also be found on the same StackCP page.
    • Add the database password to MySQL Workbench by clicking Store in Vault.
  4. Test Connection:
    • Click Test Connection to ensure everything is configured correctly. You should see a success message.

By following these steps, you can efficiently manage your StackCP-hosted databases remotely, enhancing your workflow and database management capabilities.