Steps to Allow Remote Database Access with a Wildcard Host

To configure remote database access for cPanel, allowing a host with a wildcard (%), you would typically follow these steps:

  1. Login to cPanel:

    • Use your cPanel account credentials to log in.

  2. Access MySQL Database Section:

    • In the Databases section of cPanel, click on MySQL Databases.

  3. Add a Remote Host:

    • Under the Remote MySQL section, you can add a host that can connect remotely to the database.

    • In the Host field, enter % to allow connections from any IP address or specify a particular host or IP range. For example:

      • % allows any IP to connect.

      • 192.168.1.% allows any IP in the 192.168.1.* range.

  4. Create a Database User:

    • In the MySQL Databases section, create a new user or use an existing user. Ensure that the user has access to the database that you want to allow remote access to.

  5. Grant Privileges to the User:

    • In the MySQL Databases section, scroll down to the Add User to Database section.

    • Select the user and database, then assign the appropriate privileges (e.g., All Privileges).

  6. Update MySQL Configuration:

    • Make sure that your MySQL server is configured to allow remote connections. You may need to modify the MySQL configuration file (my.cnf) to bind MySQL to an external IP (or 0.0.0.0 to listen on all IP addresses).

    • Add or ensure the following line is in your MySQL configuration (my.cnf or my.ini):

      bind-address = 0.0.0.0
      
  7. Restart MySQL:

    • After making the necessary changes, restart the MySQL service to apply them.

  8. Check Firewall:

    • Ensure that your server’s firewall allows inbound traffic to MySQL port (default: 3306).

Notes:

  • The % wildcard in MySQL allows any host to connect. It’s a quick method for allowing broad access, but you should consider security risks and limit access where possible (e.g., restricting to specific IP ranges or addresses).

  • You may need to ensure that remote MySQL connections are supported in your hosting plan.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Reset a user's password of WordPress through phpMyAdmin

To reset a user's password in WordPress, follow these steps: Log in to your cPanel account....

How to Reset the Admin Panel Password in DataLife Engine

To reset the admin panel password for DataLife Engine (DLE) from phpMyAdmin, follow these steps:...

Fixing Missing or Broken wp_aioseo_cache Table (AIOSEO)

If you are seeing errors related to the wp_aioseo_cache table (e.g. missing columns like key or...

Accessing MySQL Using a Stored Password (CyberPanel)

On servers managed by CyberPanel, the MySQL root password is stored in a local file. Instead of...