How to Remotely Access MariaDB/MySQL Databases

You can have certain types of external sources remotely access MariaDB/MySQL databases on your HostM hosting account.

For security reasons, numerous IP addresses, dynamic IPs, and IP ranges are not supported. This feature is primarily meant for connections from remote servers and devices with static IPs, rather than desktops and mobile devices with dynamic IPs.

If your device has a dynamic IP and you only need a temporary remote connection, i.e. it doesn’t matter if access is no longer possible in the future due to an IP change on your device, you may proceed with the steps below using the existing dynamic IP of your device.

However, if you’d like a more permanent setup and don’t have a static IP, you’ll need to sign up for a dynamic DNS hostname. You can find dynamic DNS providers (both free and commercial) by looking up “dynamic dns” in your favorite search engine.

If you’re wanting to use a database administration tool such as Navicat, an alternative is phpMyAdmin in your hosting account’s cPanel, which is accessible via a web browser from any location, and offers many similar functions.

If you’re creating a desktop or mobile application that needs to access data within MariaDB/MySQL databases in your hosting account, then instead of connecting directly to the database like this, we recommend creating server-side scripts (your own APIs) with specific calls that access the databases, and having the desktop or mobile apps connect to your API via HTTPS. LiveCode developers can check out our LiveCode MariaDB/MySQL HTTPS API demo.

Otherwise, if your device meets the remote connection requirement of having a static IP or a dynamic DNS hostname, follow these steps to connect remotely to a MariaDB/MySQL database on your HostM hosting account:

  1. Sign in to your HostM hosting account’s cPanel.

    Your cPanel access details are listed on the hosting account’s Info page in the Client Lounge.

  2. Under the Databases section, click Remote MySQL.

  3. Enter the IP address of the device that you wish to add in the Host field.

    You can find the IP address by visiting our IP location tool from a web browser running on the device from which you wish to connect remotely to MariaDB/MySQL.

    If you are using a dynamic DNS hostname instead of an IP address, please enter just the % character instead of an IP address.

  4. Click the blue Add Host button.

  5. Open a Client Care ticket via the Client Lounge to let us know the IP address (or dynamic DNS hostname if you're using one) of the remote device, so that we can have it added to our firewall.

  6. Once we’ve added the new entry to the firewall, you may connect remotely from the device using the following details:

    • MariaDB/MySQL Hostname: (Your Account Hostname as listed on your hosting account’s Info page)

    • MariaDB/MySQL Port: 3306

    • MariaDB/MySQL Database: (As listed on the MySQL Databases page in your cPanel. Remember to include the underscore ‘_’ character)

    • MariaDB/MySQL Username: (As listed on the MySQL Databases page in your cPanel. Remember to include the underscore ‘_’ character)

    • MariaDB/MySQL Password: (Password for your MariaDB/MySQL user)

    • SSL: Off
      (Please note that SSL is not currently available for remote direct connections to MariaDB. If remote connections via SSL are desired, we recommend using an HTTPS API layer instead)