Setting Up Remote Database Access

WP Engine provides access to your install’s database via phpMyAdmin in our User Portal by default. In some cases though, you might need remote MySQL connections to the database from some other remote client.


Whitelist Connecting IP

An IP must be whitelisted by our team on the database server port or your connections will fail. For security purposes, no more than 10 IPs per hosting account can be whitelisted on the database port at a time. IP ranges cannot be whitelisted on the remote database port.

Reach out to our Support team to have your IP whitelisted.


Locate Database Credentials

Hostname: ENVIRONMENTNAME.sftp.wpengine.com
Username: Found in your environment’s wp-config.php file
Password: Found in your environment’s wp-config.php file
Port: 13306
SSL: Required

Some clients, including mysql command line clients 5.6 and earlier, require CA certificate validation in order to establish an SSL connection. You can download our root CA certificate for validation at the following URL:

https://storage.googleapis.com/wpengine-public-assets/certificates/wpengine_root_ca.pem


Remotely Connect to the Database

The environment name has been redacted in these examples, please replace redacted or ENVIRONMENTNAME with your environment name where appropriate.

MySQL

Be sure not to enter the password visibly, this will ask for the password after entering the command due to the -p flag.
mysql -h ENVIRONMENTNAME.sftp.wpengine.com -u ENVIRONMENTNAME -p -P 13306 --ssl-ca=wpengine_root_ca.pem --default-auth=mysql_native_password
The end of this command will be the full path of where the .pem certificate file is saved.

Example:
mysql -h mysite.sftp.wpengine.com -u mysite -p -P 13306 --ssl-ca=~/Downloads/savedpemfile/wpengine_root_ca.pem --default-auth=mysql_native_password

MySQL WorkBench

MySQL workbench 8.0+ works with one additional modification to the connection settings. Under the Advanced tab add the following to the Others text field:

defaultAuth=mysql_native_password


Connection Tips

  • If you are connecting to a cluster environment (AWS), SSL is required.
  • If the connection keeps failing, be sure you’re sure your IP is whitelisted with WP Engine Support and verify the credentials you are connecting with are correct.
  • If you still experience connection issues, try SSH Gateway instead. SSH Gateway will allow you to easily and securely run MySQL commands on your website.
  • Older versions of MySQL Workbench may be unable to connect over port 13306. To resolve this issue, simply download the latest version from MySQL Workbench and update your software.

NEXT STEP: Learn about WP Engine’s SSH gateway

Still need help? Contact support!

We offer support 24 hours a day, 7 days a week, 365 days a year. Log in to your account to get expert one-on-one help.

The best in WordPress hosting.

See why more customers prefer WP Engine over the competition.