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 5 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 install’s wp-config.php file
Password: Found in your install’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
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
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 and you’re sure your IP is whitelisted and the credentials are correct, try connecting without SSL to port 3306 instead.