Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Cannot log in to the MySQL server #13543
Steps to reproduce
phpMyAdmin should have logged me in without any issues.
However, the following PHP code which uses the mysqli_connect function is able to connect to the database without any error
This is my config.inc.php
Can anyone point me in the right direction regarding the issue as I have tried all the possible solution from Google with no success?
The Problem only occurs on Ubuntu servers and it's working fine on CentOS 6 & 7
Tried, didn't help got the same error, even the WebServer logs were empty.
I even hardcoded the root password in the connection function that too resulted in the same error.
the error is originating from the phpmyadmin/libraries/plugins/AuthenticationPlugin.class.php in the 4.6.6 version where if it doesn't get an error no it just displays
@nijel Can you please guide where should I be looking next in the code.
@nijel Thank you for your response.
First I checked the /var/log/mysql/error.log and the following error is is thrown by MySQL:
However the following command mysql -uroot -p with the ROOT password works fine
As mentioned by you I tailed the /var/log/auth.log file, which didn't give much information:
No, but phpMyAdmin does (if php is built with syslog support), see https://docs.phpmyadmin.net/en/latest/config.html#cfg_AuthLog
I have managed to solve this issue, so here is the fix.
On Ubuntu MySQL 5.7 you don't need to enter the ROOT password while logging in via Terminal as a ROOT user, as MySQL just check's the socket.
But as phpMyAdmin run's as non-root user you can't log in as ROOT.
So instead you can create a ROOT privilege user and change the connection type to TCP in PMA config file, after that you will be able to login as a ROOT user.
@nijel can you confirm if I am doing the right workaround to resolve this issue.