Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just can't login to PhpMyAdmin anymore, it says bad logins. PHP works perfectly. Please help. Thank you.

2002 Cannot log in to the MySQL server
Log in

Connection for controluser as defined in your configuration failed.
share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

It could be that your phpmyadmin configuration was somewhat "customised" and that it's no longer compatible with the way your MySQL server's configured. This should normally by handled properly when upgrading both.

If you don't understand your phpmyadmin configuration or didn't set it up yourself, some issues with phpmyadmin's configuration in Debian/Ubuntu can be overcome by purging and reinstalling the phpmyadmin package, or perhaps simply with sudo dpkg-reconfigure phpmyadmin.

share|improve this answer
Worked like a charm! thanks bro. –  Srinivas Gowda Jul 30 '12 at 8:32
add comment

You may reconfigure phpmyadmin, and reset MySQL password.

  1. Ctrl + Alt + T to launch terminal
  2. sudo dpkg-reconfigure phpmyadmin
  3. Connection method for MySQL database for phpmyadmin: unix socket
  4. Name of the database's administrative user: root
  5. Password of the database's administrative user: mysqlsamplepassword
  6. MySQL username for phpmyadmin: root
  7. MySQL database name for phpmyadmin: phpmyadmin
  8. Web server to reconfigure automatically: apache2
  9. ERROR 1045
  10. ignore
  11. sudo dpkg-reconfigure mysql-server-5.5
  12. New password for the MySQL "root" user: mysqlsamplepassword
  13. Repeat password for the MySQL "root" user: mysqlsamplepassword

Wish it helps!

Have a nice day!

share|improve this answer
add comment

If you upgraded mysql-server, you are probably suffering a broken package that has recently release in the precise repo.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.