I've isntalled phpmyadmin via apt-get.

I've set the apache env-vars to the correct user:group. I've set ownership of /etc/apache2 and /etc/phpmyadmin to this user:group. I've restarted both apache2 and mysql several times.

My Problem: When I access [ServerIP]/phpmyadmin I get the login screen, I enter the information, and i'm right back at the login screen, with not even an error "permission denied" or "password wrong" or whatever. The only things thats different is the URL: Instead of the Original

http://[ServerIP]/phpmyadmin/index.php

I am now at

http://[ServerIP]/phpmyadmin/index.php?token=[Long Hex string here]

However, still the login dialog.

My Question: How Do I fix this?

link|improve this question
Check your PHP logs (/var/log/httpd/error.log, possibly) for errors. – Bill Weiss Feb 15 '10 at 3:16
feedback

10 Answers

Check your cookies. I think phpmyadmin uses cookies for auth. Either you are not accepting cookies, or phpmyadmin is setting the cookie with the wrong domain

have a look at your config.inc.php file you will probably want to set the 'host' setting to the same ip as you are using to access your server.

link|improve this answer
where can I find that file? I've looked but couldn't find it anywhere. – TMP Jan 5 '10 at 13:24
1  
it should be in the same directory as phpmyadmin. It might be named config.sample.inc.php, in which case rename it. Make sure to fill out $cfg['blowfish_secret'] if you don't have a config.inc.php file already. In fact, filling in (or changing) that value might fix your problem anyway. – yrosen Jul 27 '11 at 16:48
feedback

I have this happen to me a couple of times per month and it is super annoying - wiping out all the cookies pertaining to PMA has always done the trick. Depending on your browser, you should be able to find some instructions here:

http://www.aboutcookies.org/Default.aspx?page=2

I have firefox and have the web developer toolbar add-on and so I simply go to Cookies->Delete Domain Cookies

link|improve this answer
feedback

The username and password being requested are most likely for the DB, not for anything apache related. Try a valid DB user and see if that gets you where you are trying to go.

link|improve this answer
feedback

I've seen that happen if your PHP install doesn't include the "mcrypt" library. Check phpinfo() and see if you have an mcrypt section.

Do an "apt-get install php5-mcrypt" if its missing.

link|improve this answer
feedback

After installing phpmyadmin via apt-get http://127.0.0.1/phpmyadmin will work without modification and most dependencies will be satisfied. However, you may still have to install mysql:

apt-get install mysql5-server

If you want to connect to a remote mysql server you need to modify phpmyadmin's .php config file.

Another possibility is that you have cookies disabled or perhaps javascript is turned off, try using a default firefox.

link|improve this answer
feedback

Check /etc/phpmyadmin/config.inc.php and verify all of your settings are correct.

link|improve this answer
feedback
  1. Either mcrypt is not installed or your connection to mySQL is off
  2. To ensure you can connect to mySQL, make sure the php.ini file has the correct mySQL socket
  3. Inside php.ini, look for mysql.default_socket = /tmp/mysql.sock
  4. the mysql.default_socket should be set to the location of your installed mysql socket
  5. For mac os x 10.6. and if you installed mySQL, the default location is /tmp/mysql.sock
link|improve this answer
feedback

Maybe it was just that the server was briefly overloaded. Server was drawing considerable amount of resources. Try delete any unused file, example old backup data...

link|improve this answer
feedback

I had this problem too. If you used the setup wizard to configure your instance of phpMyAdmin, make sure your config.inc.php file is in the phpMyAdmin root dir, and not still in the config directory where the setup wizard put it...

link|improve this answer
feedback

I seem to have encounted this problem quite a few times in the last couple weeks.

Usually when phpMyAdmin doesn't show ANY errors while trying to use the cookie-based login its either a SESSION or POST related problem. PHP kindly omits most session errors from the log file.

Check out the following:

  • Cookies (to store session id, it should remain the same value between requests)
  • Session Directory Exists
  • Session Directory Permissions (the user should have write access)
  • Session Directory Free Space
  • Session Directory otherwise unwritable (problematic network share/drive).
  • User Disk Quota Exceeded (common if the PHP user is not www-data)
  • Other File Storage errors (such as network shares)
  • Other Session Storage errors (for instance, if you're using a special session provider)
  • max_post_size too small (or too big, 2G max_post_size rolls over to negatives)
  • Web Server Configuration problem (preventing POST requests from getting to phpMyAdmin)
link|improve this answer
feedback

Your Answer

 
or
required, but never shown