Yes, remote connections are available for both MySQL and MariaDB on our shared hosting services, though the approach differs by platform. For Windows shared hosting, the SQL servers are available to the public without any additional settings. You can connect directly to the server using your database username and password from any MySQL client or application. On Linux systems, only the local server itself is allowed to connect by default. You will need to use cPanel to create an "allow" entry for the MariaDB user or host to enable remote connections from your IP address.

Remote access is essential for developers who prefer desktop tools such as MySQL Workbench, HeidiSQL, or dbForge Studio instead of web-based phpMyAdmin. It also enables external applications, cron jobs on other servers, and .NET applications to query the database directly. The Windows configuration prioritizes ease of use while the Linux default follows a stricter security model that requires explicit IP authorization. Always determine your outbound IP before attempting remote connections, as dynamic residential IPs can change and break access.

#Prerequisites for Remote MySQL or MariaDB Connections

  • An active database user with SELECT, INSERT, UPDATE, and DELETE privileges on the target database
  • The exact hostname or IP of the SQL server, listed in your hosting account control panel or welcome email
  • Your current public IP address (use a site such as whatismyipaddress.com to confirm)
  • A MySQL client installed locally or the MySqlConnector library in your .NET project

Verify these items before troubleshooting connectivity. Most connection failures on Linux stem from an unlisted client IP rather than incorrect credentials. On Windows the server is reachable from anywhere, but firewall rules on your local network or ISP can still block outbound MySQL traffic on port 3306.

#Connecting to MySQL on Windows Shared Hosting

No server-side changes are necessary. Provide the database server hostname, your SQL username, and password to any compliant client. The server accepts connections on the standard MySQL port 3306 from any source IP. This immediate availability supports rapid development and testing from laptops, office desktops, or cloud build agents without opening tickets or editing firewall rules.

bash
mysql -u dbuser123 -p -h mysql.youraccountserver.com

After entering the password at the prompt you will be placed at the mysql> prompt if the credentials and hostname are correct. The same parameters work in graphical clients. In production code you should store the connection details in encrypted configuration files rather than hard-coding them.

#Example .NET Connection String

csharp
string connStr = "Server=mysql.youraccountserver.com;Database=your_database;Uid=dbuser123;Pwd=StrongPasswordHere;SslMode=Preferred;";
using var conn = new MySqlConnection(connStr);
await conn.OpenAsync();

The example above uses the MySqlConnector package, which is fully compatible with our Windows MySQL servers. Adjust the Server value to match the hostname shown in your account. Adding SslMode=Preferred enables encryption when available without enforcing it on older clients.

#Enabling Remote Access for MariaDB on Linux Hosting

Linux plans run MariaDB with remote access disabled at the firewall and user-host level. You must explicitly authorize your IP through cPanel. The process adds an access host entry that updates the underlying MariaDB grants and opens the necessary iptables rules on the shared server.

  • Log in to cPanel for the Linux account that owns the database
  • In the Databases section, click the "Remote MySQL" icon
  • Enter your public IP address in the "Add Access Host" field; avoid using the wildcard % unless absolutely required
  • Click "Add Host" and wait for the success confirmation

Changes usually take effect within 30 seconds. If you use a dynamic IP or VPN, you may need to repeat this step when your address changes. For security, remove obsolete IP entries promptly to reduce the attack surface.

#Common Pitfalls and Troubleshooting

  • Host 'your.ip.address' is not allowed to connect: missing or incorrect cPanel Remote MySQL entry on Linux
  • ERROR 1045 (28000): Access denied: incorrect username, password, or the user lacks remote-host privileges
  • Connection timeout: local firewall, corporate proxy, or ISP blocking outbound port 3306
  • Intermittent failures: dynamic IP changed since the allow entry was created

When diagnosing, first confirm the exact error message from your client. Test connectivity with the command-line mysql tool before integrating into application code. Packet captures or telnet to port 3306 can verify whether the port is reachable at all.

If you need assistance, contact our support department and we will be happy to help. Provide your hosting platform (Windows or Linux), the exact error text, and whether the database user was created before or after the remote host entry.

Remote database connectivity, when properly configured, provides flexibility without compromising the shared environment. Use specific IP allow rules on Linux, strong passwords, and least-privilege database accounts. Revisit your access hosts quarterly to keep the configuration current and secure.