How to Connect to a Hostinger Database Remotely (MySQL Guide)
Table of Contents
- 1. What Is Remote Database Access?
- 2. Pre-Connection Requirements
- 3. Finding Database Credentials in hPanel
- 4. Allowing Remote Access (hPanel Setup)
- 5. Connecting with MySQL Workbench
- 6. Connecting with DBeaver Client
- 7. Connecting via Command Line Shell
- 8. Troubleshooting Port 3306 Errors
- 9. Database Security Best Practices
1. What Is Remote Database Access?
Remote database access is the ability to connect to your website's MySQL database server from an external computer or server located outside Hostinger's local data center network.
By default, hosting providers block remote connections to database servers to prevent unauthorized queries and brute-force injection attacks. However, developers and administrators frequently need remote access to execute bulk imports, perform schema migrations, sync staging setups, or connect GUI clients like DBeaver and MySQL Workbench.
2. Pre-Connection Requirements
Before initiating a remote database connection to your Hostinger MySQL server, verify the following prerequisites:
- An active Hostinger Single, Premium, Business, or Cloud hosting plan.
- An already created MySQL database and associated database user.
- Your local public IP address (you can find this by visiting a site like
whatismyip.com). - A database client client (like MySQL Workbench, HeidiSQL, DBeaver, or the MySQL CLI client) installed on your local computer.
3. Finding Database Credentials in hPanel
To configure your external database client, you need your specific server details. Here is where to locate them:
- Log into hPanel, go to the Websites tab, and click Manage next to your site.
- Scroll to the Databases section on the left menu and click MySQL Databases.
- Under the List of Current MySQL Databases And Users section, copy the following variables:
- MySQL Database Name: (e.g.,
u123456789_db) - MySQL User: (e.g.,
u123456789_user) - Database Server IP Host: (Located at the top of the MySQL database panel page)
- MySQL Database Name: (e.g.,
4. Allowing Remote Access (hPanel Setup)
Once you have your credentials, you must whitelist your external IP address to bypass Hostinger's firewall filters:
- In the MySQL Databases page in hPanel, scroll down to the Remote MySQL section.
- In the IP (IPv4 or IPv6) input field, enter your local public IP address (or enter
%to allow any external IP to attempt connection, though this is discouraged). - In the Database dropdown list, select the target database you wish to connect to.
- Click Create. You will see a notification stating the remote IP has been added to the authorized whitelist database.
5. Connecting with MySQL Workbench
MySQL Workbench is the official desktop database modeling client. Follow these steps to configure your remote connection:
- Open MySQL Workbench on your local machine and click the + icon next to MySQL Connections.
- In the Connection Name field, enter a name (e.g.
Hostinger Production). - Under Connection Method, select Standard (TCP/IP).
- In the Hostname field, enter the Database Server IP Host you copied from hPanel.
- Set the Port value to
3306. - In the Username field, enter your full MySQL User string.
- Click Store in Vault next to Password and enter your database user password.
- Click Test Connection. If configured correctly, you will receive a success message. Click OK to save.
6. Connecting with DBeaver Client
DBeaver is a popular, open-source multi-database management client.
- Launch DBeaver and click the plug icon (New Connection) in the top menu.
- Select MySQL from the database list and click Next.
- In the Server Host field, enter your Hostinger Database IP address.
- Ensure the Port is set to
3306. - Enter your MySQL Database Name in the Database field.
- In the Username and Password fields, input your MySQL database credentials.
- Click Test Connection. DBeaver will prompt you to download the MySQL driver if it is missing. Once completed, save the connection.
7. Connecting via Command Line Shell
If you prefer working inside a command-line terminal, you can connect directly by running this shell command on your local machine:
*Replace variables inside brackets with your actual hPanel credentials. Press Enter and input your password when prompted.
8. Troubleshooting Port 3306 Errors
If your connection fails, it is usually due to one of three issues:
- Local ISP Port Blocking: Some ISPs block outgoing TCP traffic on port 3306 to prevent malware spamming. If you suspect this, check your port status using terminal utilities or attempt connection using a VPN or mobile hotspot network.
- Dynamic IP Changes: If you whitelisted a specific IP and your router reboots, your public IP will change. Log into hPanel, verify your current public IP, delete the old Remote MySQL whitelist entry, and create a new one.
- Wrong Hostname: Ensure you did not use your domain name (yoursite.com) as the host if it uses nameservers like Cloudflare. Cloudflare hides your server IP, meaning connection requests sent to the domain will fail. Always use the raw Database Server IP address.
9. Database Security Best Practices
Exposing databases to the public web carries security risks. Protect your hosting infrastructure using these configurations:
- Limit Whitelisting: Never leave a wildcard (%) active on production databases for more than a few minutes. Delete whitelist entries as soon as you complete your migrations or admin tasks.
- Implement SSH Tunnels: Instead of opening port 3306, set up an SSH tunnel in MySQL Workbench or DBeaver. This forwards database queries securely through port 22 (SSH) using your Hostinger hosting account credentials, eliminating the need to expose MySQL ports.
- Set Hard Database Passwords: Generate randomized passwords containing upper/lowercase letters, numbers, and symbols inside hPanel to resist brute force script parameters.
Guide Quality & Editorial Integrity
SaaSphere maintains a dedicated technical sandbox lab to run active hosting server deployments. This redirect guide is updated for 2026 hPanel layouts and checked against real Apache/LiteSpeed config standards. Written by our in-house systems team.
Frequently Asked Questions (FAQ)
Verified Promo Deal
Need a new hosting tier? Get up to 85% OFF on Hostinger by using our verified promo code at checkout.
