- Newest
- Most votes
- Most comments
Hello,
Thank you for showing your interest in AWS Forums.
As you mentioned that you are able to use/login phpmyadmin (from http://<ip>/phpmyadmin) as a root via SSH tunneling which means everything is working fine as expected from AWS Infrastructure end.
Regarding your concern about the 'dbmasteruser' user i.e you are not able to view any DBs created/imported by the root user from 'dbmasteruser'.
--> In order to achieve your use-case, what I can suggest you is 'check for the mysql-user 'dbmasteruser' privileges as I believe that it doesn't have required admin-permission to view the DB/tables of 'root' user.
Please refer below links to learn more about Granting User level access in mysql.
Related links :
http://www.mysqltutorial.org/mysql-grant.aspx
https://chartio.com/resources/tutorials/how-to-grant-all-privileges-on-a-database-in-mysql/
https://dev.mysql.com/doc/refman/8.0/en/grant.html
I hope the above has provided some insight on the matter.
If there's something that you're concerned about please do post here and we'll do our best to find out/clarify for you.
I paid for Developer support, and AWS was able to solve my problem. I am sharing it here to help others who may encounter similar issue.
A. Why phpmyadmin does not display database content in my lightsail database?
In your account, you have a lightsail LAMP instance "XXX", which is a complete application stack imaged by Bitnami, the stack contains these main components: Apache, php-fpm, mysql. Also, the stack is pre-installed with phpmyadmin, to allow users to manage the local database via GUI.
The point here is that phpmyadmin pre-installed in the LAMP stack is connecting to the local mysql database inside the same OS.
As for the lightsail database instance, it's actually a separate database instance outside the LAMP stack, and to access it via phpmyadmin from the LAMP instance, you will need to make a few configuration changes in phpmyadmin.
B. How to update phpmyadmin to be able to connect to my dedicate lightsail database?
You will need to update phpmyadmin configuration file config.inc.php in the LAMP stack, so it can point to lightsail database instead of localhost. The configuration file is located at /opt/bitnami/apps/phpmyadmin/htdocs/config.inc.php
Following is the steps that I took in my own lab environment to update the configuration file:
- SSH to the LAMP stack with user bitnami
- Find the configuration file and take a backup
sudo su
cd /opt/bitnami/apps/phpmyadmin/htdocs
cp config.inc.php config.inc.php.bkp
- Update the file with your favorite text editor.
Following lines will need to be changed (I have updated the database endpoint and username to reflect the information in your account):
From:
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['user'] = 'root';
To:
$cfg['Servers'][$i]['host'] = 'longHostNameEndingIn.ca-central-1.rds.amazonaws.com ';
$cfg['Servers'][$i]['user'] = 'dbmasteruser';
Edited by: DaveMaul on Jul 28, 2019 8:01 AM
Relevant content
- Accepted Answerasked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 9 months ago