For security issues, Hostgator requires more parameters – like port, etc. – in wp-config.php to connect to a remote – non-localhost – mysql server.
Read http://support.hostgator.com/articles/cpanel/how-to-connect-to-the-mysql-database-remotely
Related Posts:
- Problem migrating to localhost
- How to re-connect WP files in lampp/htdocs to new SQL database to recover site under development
- Cloned site not connecting to database – MAMP
- Can I connect WordPress website with an external database?
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Please explain how WordPress works with MySQL character set and collation at a low level
- Connect to database using wordpress wp-config file
- Connect to remote database using Localhost install
- Best way to move live site local
- Accessing two databases
- Custom DB_COLLATE (collation) value not working on fresh install?
- Connect to live db whilst working locally
- No wp-config.php file on local install of wordpress – site still displays
- Why can’t I swap a DB in a WP install? [closed]
- Can I have multiple database users within WordPress?
- Error establishing a database connection on Installation
- Import live site to local setup without access to live site
- Moving WP from local server to live, error establishing a db connection
- Moving online website to MAMP or dumb idea?
- Moving minor updates between local and live sites – just database?
- Difficulty importing my live site to local
- Switching Databases in LocalHost
- Localhost to Staging to Development Dynamic WP-CONFIG
- How to share plugin created database tables between two WordPress sites
- Is my way to change WordPress server is correct?
- how to encyrpt DB_PASSWORD in wp-config
- Design problems when exporting remote database for local development
- How to transfer from localHost to live but use the already existing database on the server?
- Installing local to live WP into subdirectory
- Database migration issues – Error #1046 No database selected
- Getting “Error Establishing a Database Connection” on localhost in new Mac OSX Lion environment
- Cloning blog to localhost via WAMP
- Getting WordPress to work inside a rails 3 application
- Can two domains use the same database?
- WordPress keeps redirecting to localhost
- Recovery – Restore Database after moving folder location locally
- Duplicate database to roll back theme & content changes
- Search and Replace in Windows XAMPP site
- Confused over wp-config.php and ‘database user + database password + name’
- Locally installing wordpress. Database problem
- execute custom function on database connection error
- Does WordPress Support Using Named Pipes on the Windows Operating System?
- I have include wp-config, should I add global $wpdb also?
- Can’t Install WordPress (local) Failed to open file wp-includes/wp-db.php
- Issue “Error establishing a database connection” problem.
- Local Content different from Remote Content
- How can I work on a database along side a client?
- Restoring .sql backup results in “Error establishing a database connection”
- /var/run/mysqld/mysqld.sock
- DB access blocked when initializing WP externally
- How to use remote db tables in current config? [duplicate]
- Multiple Address In WP-Option Value
- ERROR: “Table Prefix” must not be empty
- Theme Options – localhost to new url
- wp-config was suddenly updated
- What is this JavaScript “require”?
- How can I make updates to a site, on a development copy, but then move updates back without overriding live site’s evolving database?
- get_results using wpdb
- wpdb->insert multiple record at once
- How to migrate a HTTPS WordPress installation to localhost?
- How to monitor server for error establishing a database connection
- remove missing image attachments
- Transient RSS feeds in wp_options not removed automatically?
- How to ensure data consistency in WordPress
- Database location in WordPress
- Bad Request (Invalid Hostname) on working server, database problem
- WooCommerce with thousands of products – site is very slow – optimize db queries? [closed]
- Change SQL get_results to search for posts with custom term in custom taxonomy
- How to diagnose and keep in check encoding issues?
- Add search Value to wp_list_table pagination
- I have a table I created, how do I make a form for a user to filter the data?
- wp_redirection_404 table has grown to 7GB
- Multiple wp_options tables to share content across installs
- Connection refused on locahost after importing database?
- When to use custom DB tables or add_option?
- creating new field on mysql
- Does WordPress store the username as a primary key in the database?
- Database Update Required – Update from command-line
- SQL query to set posts in bulk based on the post content
- Automate WordPress website setup with prefilled data
- Custom search query by category id
- Fetch a single row from a custom table for to a given ID
- Database create or redirect
- Database structure cheatsheet
- WordPress Database – wp_usermeta and the correct number of session_tokens rows
- A WP dev site that displays content from a live site’s database but cannot write to wp_posts?
- error establishing database connection (WAMP + filezilla)
- Is there a way for two deferent themes to consume two different DB on a same WP instance?
- How do I update a WordPress wp_postmeta meta_value that contains many options
- Auto populate form fields based on serial input or pull listings from other websites?
- How to extract some part of WordPress full source code
- Error establishing a database connection for some files
- Hash user emails in database?
- Saving data to database and exporting to excel
- Site does not work right, pages not showing up, even for root admin
- One information repeated on multiple locations on one site [closed]
- Showing Error(TAble already exist)
- Getting an error when trying to migrate to DV server from Grid with Media Temple [closed]