By default, cPanel database servers reject external connection requests for security reasons. If you need to manage your MySQL database directly from software on your personal computer (such as Navicat, DBeaver, HeidiSQL, or VS Code), you can authorize remote access easily.
Step 1: Whitelist Your Public IP in cPanel
- Log in to your cPanel.
- Under the Databases section, click on Remote MySQL.
- In a new browser tab, search
whatismyipto find your public IPv4 address. - In cPanel, paste your IP address in the Host (% wildcard is allowed) field.
- Click Add Host. Your computer is now authorized to connect to the database server.
Step 2: Connect from Your Database Client (DBeaver, Navicat, etc.)
- Host / Server: Your server hostname (e.g.,
server.baharihost.com) or server IP address. - Port:
3306(Default MySQL port). - Database Name: Your full database name (e.g.,
username_dbname). - Username: Your full database username (e.g.,
username_dbuser). - Password: The password created for that specific database user in cPanel.
% (which allows all IPs worldwide) unless absolutely necessary. Specifying your exact static/broadband IP is the recommended security practice.
Watch the Video Tutorial!
See how to connect your desktop database manager to cPanel MySQL in the video below: