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

前端 未结 12 2172
执念已碎
执念已碎 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:05

    on ubuntu 18.04 in etc/phpmyadmin/config.inc.php comment all the block

    Optional: User for advanced features

    0 讨论(0)
  • 2020-11-27 10:05

    Having just installed the XAMPP today, I decided to use a different default port for mysql, which was horrible. Make sure to add these lines to the phpMyAdmin config.inc.php:

    $cfg['Servers'][$i]['host'] = 'localhost';
    
    $cfg['Servers'][$i]['port'] = 'port';`
    
    0 讨论(0)
  • 2020-11-27 10:06

    On Ubunbtu.

    Ben's message is close but it's not the root password that is the problem, the problem I found was I had created a password for the phpmyadmin database when I installed it. This password is not carried into the installation on ubuntu so the variable $dbpass=''; in the database settings file is empty and not the password you set.

    1. To check you have the right password at the command line login to mysql using the following command: mysql -u phpmyadmin -p try a blank password I found I got access denied, enter the command again using the password you set during installation. If it logs in you now know what the password is.
    2. Edit /etc/phpadmin/config-db.php and change $dbpass=''; to $dbpass='Your Password'; and save the file.
    3. Edit /etc/dbconfig-common/phpmyadmin.conf change dbc_dbpass=''; to dbc_dbpass='Your Password'; and save the file. Close your browser and reload you will now find the message has gone way.
    0 讨论(0)
  • 2020-11-27 10:10

    The problem is that PhpMyAdmin control user (usually: pma) password does not match the mysql user: pma (same user) password.

    To fix it, 1. Set the password you want for user pma here:

    "C:\xampp\phpMyAdmin\config.inc.php"

    $cfg['Servers'][$i]['controlpass'] = 'your_new_phpmyadmin_pass';

    (should be like on line 32)

    Then go to mysql, login as root, go to: (I used phpmyadmin to go here)

    Database: mysql »Table: user

    Edit the user: pma

    Select "Password" from the function list (left column) and set "your_new_phpmyadmin_pass" on the right column and hit go.

    Restart mysql server.

    Now the message should disappear.

    0 讨论(0)
  • 2020-11-27 10:12

    "For me to make it work again I just deleted the files

    ib_logfile0 and

    ib_logfile1 .

    from :

    /Applications/MAMP/db/mysql56/ib_logfile0 "

    On XAMPP its Xampp/xamppfiles/var/mysql

    Got this from PHP Warning: mysqli_connect(): (HY000/2002): Connection refused

    0 讨论(0)
  • 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/

    0 讨论(0)
提交回复
热议问题