Tuesday, March 15, 2022

[FIXED] Configure phpMyAdmin with username and password not allows to login

Issue

I'm using phpMyAdmin on CentOS v6. Configured it to authentication type: cookie, I set username and password. (in /etc/phpMyAdmin/config.inc.php)

When I browse to http ://my-server/phpMyAdmin/ I get a web login form, I entered the username and password that I worte in the configuration file but it tells:

#1045 Cannot log in to the MySQL server

I looked after the following guide: http://ifzenelse.net/en/install-and-configure-phpmyadmin-centos


Solution

There was a conflict: the phpMyAdmin configuration that says to not allow login without a password ($cfg['Servers'][$i]['AllowNoPassword']= FALSE;), but my mysql user (root) had no password so I couldn't login!

So as mentioned in one of the answers here I had to set password to the root user by:

# mysqladmin -u root password your-password

Then restart servers and login again



Answered By - Bush

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.