“Connection for controluser as defined in your configuration failed” with phpMyAdmin in XAMPP

前端 未结 12 2231
执念已碎
执念已碎 2020-11-27 09:07

I have just installed XAMPP on my Windows XP machine, and I get an error saying:

Connection for controluser as defined in your configuration failed.

12条回答
  •  佛祖请我去吃肉
    2020-11-27 10:13

    Have you recently changed your MySQL Server root password? If answer is YES, than this is the cause of the error / warning inside phpMyAdmin console. To fix the problem, simply edit your phpMyAdmin’s config-db.php file and setup the proper database password.

    First answer is messing too much in my view and second answer did not work for me. So:

    In Linux-based servers the file is usually located in:

    /etc/phpmyadmin/config-db.php
    

    or:

    /etc/phpMyAdmin/config-db.php
    

    Example: (My File looked like this and I changed the user fromphpmyadmin to admin, the username I created for maintaining my database through phpmyadmin, and put in the appropriate password.

    $dbuser='phpmyadmin';
    $dbpass=''; // set current password between quotes ' '
    $basepath='';
    $dbname='phpmyadmin';
    $dbserver='';
    $dbport='';
    $dbtype='mysql';
    

    credits: http://tehnoblog.org/phpmyadmin-error-connection-for-controluser-as-defined-in-your-configuration-failed/

提交回复
热议问题