I have MySQL set up correctly on my linux computer, however I want a better way to input data into the database besides terminal. For this reason, I downloaded phpMyAdmin. However, when I try to log in to the phpMyAdmin from index.php, it doesnt do anything. It seems to just refresh the page without doing anything. I am putting in the correct MySQL username and password. What is the issue?
Here is a screen shot of what it shows after I click "go".
Do you have a .htaccess file in one of the parent directories that strips off index.php from the url by doing a 301 redirect?
301 redirects discard the form data and redirect you as if you didn't submit anything. So you get returned to the login page.
So you should create a local .htaccess file in the phpmyadmin directory with a single line
RewriteEngine On
. This will overwrite the previous rewrite rule to nothing.You may need to clear the browser cache as Chrome aggressively caches 301 redirects.
I am late to the game, but on Amazon linux AMI I could not log in to phpmyadmin ... it just kept refreshing the login screen with no errors.
I have fixed with below command
In my case the solution was to set an Apache setting properly:
This was required, because ProxyPass and ProxyPassReverse were in use, but cookie paths are not changed automatically.
It'd be great if PHPMyAdmin had shown something like session not found or anything, when password is sent with POST.
phpMyAdmin will show errors when login fails. If it doesn't, it means that your setup has an error.
The most likely place to check is your
php.ini
settings. Since there doesn't seem to be an official list of phpMyAdmin-compatible settings, it's mostly trial and error.Make sure you have enabled the stuff that needs to be enabled. Also check that you did not enable uncommon php.ini settings (like
enable_post_data_reading = Off
) because phpMyAdmin assumes them to be "the usual ones".To ease debugging, start with a clean default
php.ini
file then tweak them line by line to see which setting is causing the error. (Don't forget that you need to restart your server after changing thephp.ini
file for the changes to take place.)If you have an error like:
Host 'host_name' is blocked because of many connection errors.
Login in your mysql as root and run the flush hosts command
1.- mysql -u root -p
2.- mysql > flush hosts
After this I was able to login again in phpmyadmin
Login fails if session folder in not writeable. To check that, create a PHP file in your web directory with:
If session folder is not writeable do either
sudo setfacl -R -m u:www-data:rwx <session directory>
or chmod 777sudo setfacl -R -m u:www-data:rwx <session directory>
-