I have just reset my root password after a long struggle. I see there are three root users in phpmyadmin. Should I delete two roots and keep only one or I need all the three?
(I am afraid of keeping three roots and changing the root password, may not allow me to enter phpmyadmin again due to multiple root ambiguity. I just wonder how three root users have been created. isn't that localhost and the local IP 127.0.0.1 refer to same local server/system? )
Thanks in Advance for any help,
First of all, there is no such thing as phpmyadmin users. These users are defined in mysql. Phpmyadmin only manages mysql databases.
As @urfusion has pointed out, in mysql a user is made up of an username and a host name part in form of 'user_name'@'host_name'. Host name refers to the computer from which the connection is made. If 2 user accounts have the same username, but different host names, then those are not the same users, even though their access rights might be the same.
The complication in mysql is that a computer may be identified through its name (e.g. mycomputer) or its IP address (e.g. 1.1.1.1), depending on whether mysql is able to resolve the IP address of the host or not. This is why mysql comes with a 'root'%'localhost' and a 'root'%'127.0.0.1', just to make sure that you can connect initially regardless if IP address resolution works or not.
If the host name is left blank or contains '%', it means that with that user id you can connect from any machine. This is the 3rd default root user in mysql.
If you do not want to connect to your mysql database from a different computer as root, then you can remove the 'root'%'%' account. This depends on your operational environment. If php (webserver) runs on the same computer where mysql is, then phpmyadmin requires a user account with localhost or 127.0.0.1 hostname only.
However, I would leave the 'root'%'localhost' and a 'root'%'127.0.0.1' intact just in case IP address resolution does not work. I would also make sure that their access rights are exactly the same (by default they are).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With