Connect to the database server
By default, the database port in this solution cannot be accessed over a public IP address. As a result, you will only be able to connect to your database server from the runtime server (the server instance running the application). Follow these instructions to connect to the database server:
- Connect to the application server via SSH following the steps in the Forwarding your key using SSH Agent section.
Once logged in the application server, you must obtain the server hostname where the database is running by executing the following command:
$ sudo cat /opt/bitnami/wordpress/wp-config.php | grep 'DB_HOST'
You should see an output similar to this:
In this case, the server hostname where the database is running is “provisioner-peer”.
Inside the application server, with the SSH key forwarded, run the following command to connect to the database server through SSH. Remember to replace SERVER-IP with the value obtained for the DB-HOST:
$ ssh bitnami@SERVER-IP
In the current example, the command would be the following:
$ ssh bitnami@provisioner-peer