Viewing 8 replies - 1 through 8 (of 8 total)
  • Some information to help get you started: support.hostgator.com > How to Connect to the MySQL Database Remotely

    Thread Starter oritzio

    (@oritzio)

    I’ve read this already, and i also add my IP to the
    “Remote Database Access Hosts”

    I just don’t know what to write on the DB_HOST,
    I’ve been with the hostgator support, but they couldn’t help me…

    also the 3306 port is open, what am i doing wrong?

    Have you had a chance to try your own domain name yet – the domain where the remote database is located?

    Example: define('DB_HOST', 'yoursite.com');

    Thread Starter oritzio

    (@oritzio)

    yes, i’ve tried… any ideas what i’m doing wrong?
    i don’t get it.. it’s probably hosting issue…

    marod5000, i’m not trying to move wp from local to online

    I’ve been with the hostgator support, but they couldn’t help me…

    I hope they didn’t just brush you off because it was a “WordPress Problem”, because it really isn’t. I don’t think it makes any difference what application you are using to remotely connect to your database. The information you need will probably be the same.

    What is actually happening when you try to connect to your local WordPress site, using the remote database information in wp-config? Are you getting a “Connection Refused” error, “Error establishing a database connection” error, does it look like the browser just keeps trying to connect forever, or does the browser actually appear to connect, but then all you see is just a blank white page?

    Thread Starter oritzio

    (@oritzio)

    It’s this error:
    “Error establishing a database connection”

    It’s just trying to connect to the host, but it couldn’t so it stopped

    I know it sounds like a pain, but if you really want to give it a try, you might need to contact your hosts support group again to clear it up. Some steps to review with the support group:

    – Verify the database name, database username and user password for your remote database, and make sure they match in your local wp-config file.

    – Make sure that the IP address you added to the MySQL Remote Access list in cPanel is currently your correct external home IP address. If you have a dynamic IP address, you will need to update it in cPanel whenever it changes. Even though you added your IP address to Remote Access, some hosts still require you to file a support ticket before they actually whitelist your IP. Be sure to clarify that issue with your host so you know for certain if it’s required.

    Lastly, come right out and ask them what address you need to use to remotely connect to your database. Do they want your domain name? Ex: yourdomian.com, or a numeric IP address of the server? Ex: 123.456.789.0 or if they want something entirely different. I think that will be the only way you are going to get it resolved.

    The issue I would be concerned with, is how your localhost installation is going to react to the valid domain names and paths that are stored in the remote database. If you do get it to successfully connect, you would probably still be trying to pull in everything from your remote server. Images, theme files, plugins, etc.. I think clicking on any link would likely try to send you to the live domain. If your goal is wanting to update or mirror a live site from a local install, I think there might be some stumbling-blocks to overcome.

    Good luck to you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Connect local WordPress Site to remote database’ is closed to new replies.