0
votes
  1. Amazon Lightsail LAMP instance. SSH tunnel all created. I can login to phpmyadmin (127.0.0.1/phpmyadmin) using root, but not using dbmasteruser that AWS told me I should use.
  2. When I import databases into phpmyadmin, they are seen by root user, but my code, which should authenticate as dbmasteruser, cannot see them. All attempts to grant privileges (as root) to dbmasteruser, fail with an error indicating that this user is not recognized.

Can someone who has done this before help me with what I am missing?

1
Are you using the hosted database feature or your own mysql server running in an instance? What blueprint are you using?David G
It is the built-in phpmyadmin app that comes with Lightsail LAMP instance. I have tried changing my control user away from the supplied "root" to "dbmasteruser", to no avail. I have tried (as root, the only user I can log into phpmyadmin as) granting access to other databases to user 'dbmasteruser', but no luck there either.Dave

1 Answers

1
votes

I could not find the db I created in AWS Lightsail when logging into phpmyadmin following the Bitnami instructions referenced on my instance. I only found what looked like a default Bitnami db server. It appears the db I created is on a different server, so this worked by adding another server to the phpmyadmin config file located in /opt/bitnami/apps/phpmyadmin/conf/config.inc.php as the endpoint listed in Lightsail.

Need to place this snippet after the last line in the file for the existing server or just replace the host with your endpoint address not to have access afterward to the Bitnami default server. For me this was after the line $cfg['Servers'][$i]['tracking_add_drop_database'] = true; or line 600 in the file:

$i++;
$cfg['Servers'][$i]['host'] = 'endpoint.us-east-1.rds.amazonaws.com';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['verbose'] = 'Lightsail';

Then choose Lightsail as the server choice when logging into phpmyadmin with the username and password as listed in the AWS Lightsail website for the database you want to access in phpmyadmin.