By default, MySQL databases on the Nobregas panel are only accessible from localhost (the same server). To connect from an external server, application, or your local development machine, you must whitelist its IP address first. This keeps your database secure while allowing authorized remote connections.
Why IP Whitelisting Is Required
Open database ports are a major security risk. Without IP restrictions, anyone on the internet could attempt to connect to your MySQL server. Whitelisting ensures only connections from trusted IP addresses are accepted — all others are rejected.
Step-by-Step: Whitelisting an IP
- Log in at mysql.nobregas.org.
- Click Databases in the top navigation bar.
- Scroll down to the Remote MySQL — Allowed IPs section at the bottom of the page.
- Enter the IP address you want to whitelist in the input field.
- Click the Add button.
- The IP appears in your whitelist and remote access is enabled for that address.
Finding Your IP Address
From Your Local Machine
Visit https://whatismyipaddress.com or search "what is my IP" in Google. Use the IPv4 address shown.
From a Remote Server
SSH into the server and run:
curl ifconfig.me
or
hostname -I
From a Cloud Provider
Check your server's dashboard on AWS, DigitalOcean, Linode, Vultr, or similar. The public IP is shown in the server details.
IP Format
Enter the IP address in standard IPv4 format:
- Single IP:
203.0.113.50 - Only individual IP addresses are supported per entry.
After Whitelisting
Once the IP is added, you can connect remotely using:
- MySQL client:
mysql -h your-server-host -P 3306 -u username -p - PHP:
new PDO('mysql:host=your-server-host;port=3306;dbname=mydb', 'user', 'pass') - Application config: Update your database connection settings with the remote host and port.
The connection details (hostname and port) are available on the Databases page.
Security Best Practices
- Only whitelist IPs you control — Never add unknown or public IPs.
- Remove IPs when no longer needed — If you stop using a server, remove its IP from the whitelist.
- Use specific IPs — Avoid adding broad ranges. Each whitelisted IP should correspond to a known server or office.
- Combine with strong passwords — Whitelisting controls network access; strong passwords protect authentication.
- Monitor your whitelist — Review it periodically and remove stale entries.
Dynamic IP Warning
If your home or office has a dynamic IP (changes periodically), you may need to update the whitelist when your IP changes. Consider using a server with a static IP as an intermediary.