Allow dynamic IP to connect to MySQL Remotely

  Dedicated Hosting, Shared hosting, WHM

Introduction

Many Internet Service Providers (ISPs) assign dynamic IP addresses to their customers. Unlike static IPs, dynamic IPs change periodically, which can make remote MySQL access configuration challenging.

In certain cases, if only part of the IP address changes, you can configure wildcard rules in cPanel to allow remote MySQL access without updating the IP every time.


Prerequisites

Before proceeding, ensure you have the following:


Steps to Allow Dynamic IP for Remote MySQL Access

  1. Log in to your cPanel account.
  2. Navigate to the Databases section.
  3. Click on Remote MySQL.
  4. In the Hosts section, add the IP address or wildcard entry.
  5. Click Add Host to save the configuration.

    Example of Wildcard Configuration

    Suppose your current IP address is:

    If your ISP changes only the last portion of the IP, such as:

    You can configure a wildcard rule like:

    192.150.14.%%
    

    This allows any IP matching 192.150.14.* to connect remotely to MySQL.


    Important Notes


    Recommended Solution

    If your IP changes drastically or frequently, the recommended approaches are:


    Conclusion

    By configuring Remote MySQL access in cPanel with either a specific IP or a wildcard rule, users with dynamic IP addresses may still be able to connect remotely to MySQL databases. For improved security and reliability, using a static IP address is always the preferred option.

    LEAVE A COMMENT