Remote MySQL connection on cPanel hosting
Usually the site works with its database on the same server (localhost) and remote access is not needed. You need it to open the database in an app on your computer or to connect an external service.
1. Allow your IP address
- Find your computer public IP (for example, on whatismyip.com).
- Open "Remote Database Access" (group "Databases").
- Enter this IP in "Host" and a note in "Comment".
- Click "Add Host".

2. Ask support to allow your IP on the server
Outside connections to MySQL are closed by the server network filter. Open a support ticket with the IP from step 1 - support adds it to the allowed list. A static (permanent) public IP is required: if your provider changes the address, access stops after the change and the new IP has to be allowed again.
3. Connect
| Setting | Value |
|---|---|
| Host | your domain or the account IP (cPanel home page) |
| Port | 3306 |
| User and database | full names with the prefix: example_shop |
| Password | the database user password |
Do not add the host % (any address): bots will start guessing the password. Allow specific IPs only and remove them when access is no longer needed.
For one-off database work, phpMyAdmin in cPanel is easier - nothing needs opening for it: phpMyAdmin.