heroku-wp
heroku-wp copied to clipboard
Error establishing a database connection
I'm getting Error establishing a database connection
when installing WP.
The following prints "Connected" when putting intowp-config.php
:
$mysqli_connection = mysqli_connect(
$_dbsettings['host'],
$_dbsettings['user'],
$_dbsettings['pass'],
trim( $_dbsettings['path'], '/' ),
$_dbsettings['port']
);
if ($mysqli_connection->connect_error) {
echo "Not connected, error: " . $mysqli_connection->connect_error;
}
else {
echo "Connected.";
}
What's going on?
This is due to the RDS certificate change.
From jawsdb.com:
You'll need to swap out this file in your repo support/mysql-certs/rds-combined-ca-bundle.pem
with this new one from AWS:
https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
and redeploy.
Pull Request opened: https://github.com/xyu/heroku-wp/pull/171
👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍
thanks a million I overlooked the update
there are a few pulls that i think is pending. Is anyone on this thread able to help keep the repo updated?
Switch WP_DB_SSL to OFF from Heroku's Settings Tab -> Config Vars