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 the 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.
Locate Database Credentials
Username: Found in your environment’s wp-config.php file
Password: Found in your environment’s wp-config.php file
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:
Remotely Connect to the Database
The environment name has been redacted in these examples, please replace
ENVIRONMENTNAME with your environment name where appropriate.
Be sure not to enter the password visibly, this will ask for the password after entering the command due to the
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.
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 8.0+ works with one additional modification to the connection settings. Under the Advanced tab add the following to the Others text field:
- 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