I’m doing this video based on a user suggestion. In some past tutorials on this channel we’ve walked through setting up a remote database service. Once using the Lightsail Database Service and another video on using the Amazon RDS service. In both the videos we move the WordPress database from the locally installed MySQL to the remote database service. The question from the user was, how to connect the PHPMyadmin tool to the remote database. By default PHPmyadmin is configured to only connect to locally installed MySQL database. So in this I will walk you through that setup.
Ok to get started, we are in our Lightsail dashboard. If you already have a Lightsail WordPress instance or a LAMP blueprint instance, both will have Phpmyadmin installed by Bitnami.
- Access you LAMP or WordPress instance.
- Setup SSH and SSH Tunnel in Bitvise
- Have a remote Database available
- This can be a Lightsail Database or Amazon RDS.
- Get the Endpoint URL
- SSH into the Server instance and open the PHPMyadmin config file
- File: config.inc.php
- Add this code just before the Default server section / parameter
$i++; $cfg['Servers'][$i]['host'] = 'RDS_ENDPOINT_URL'; $cfg['Servers'][$i]['port'] = '3306'; $cfg['Servers'][$i]['socket'] = ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['auth_type'] = 'cookie';
5. Restart Apache
sudo /opt/bitnami/ctlscript.sh restart apache