Reputation: 457
I'm installing LAMP and don't understand the difference and/or use of the MySQL password v the phpMyAdmin password as entered during their respective installations. On the first dev box I built years ago I did this:
Installing MySQL I enter a password of 'pwd01'
Installing phpMyAdmin I enter a password of 'pwd01'
...And I could log into mysql as root/pwd01 and phpMyAdmin as root/pwd01 (i.e., the same password). That made sense. Given at the moment the only user configured in mysql is root/pwd01, phpmyadmin would have to use this to gain access. So what is the pwd02 password used for?
On the new dev box I'm building today I'm doing this:
Installing MySQL I enter a password of 'pwd01'
Installing phpMyAdmin I enter a password of 'pwd02'
... And I expected I would need to log into mysql with root/pwd01 and phpmyadmin with root/pwd02. But that is not the case. The login for phpmyadmin is still root/pwd01.
So my question is: How are the passwords being used? Is the pwd02 password silently used by phpmyadmin to connect to mysql and then pwd01 is used to access the databases? That doesn't really make sense to me.
(installation is on GNOME Ubuntu 16.04 using most recent versions of mysql and phpmyadmin)
Upvotes: 0
Views: 399
Reputation: 457
I think I have figured this out
Before the phpMyAdmin install there was no MySQL user named 'phpmyadmin'. Once I saw this user I was able to confirm that the password entered during phpMyAdmin installation (i.e., pwd02) is used by the phpmyadmin user to access MySQL. Proof worked by logging in from the command line
$ mysql -u root -p (pwd01 works but pwd02 does not)
$ mysql -u phpmyadmin -p (pwd02 works but pwd01 does not)
The phpMyAdmin installation dialog that asked for the password didn't make much sense when I first read it but does now.
Upvotes: 0
Reputation: 4284
phpMyAdmin have internal tables to manage query history and other stuffs, if the password that you bring during installation is wrong that tables was not created.
That internal tables doesn't affect the regular usage of phpMyAdmin.
Upvotes: 2