phpMyAdmin Error – CONNECTION FOR CONTROLUSER AS DEFINED IN YOUR CONFIGURATION FAILED

Dear fellow reader, please subscribe to our YouTube channel and never miss great future videos! <3


phpMyAdmin: CONNECTION FOR CONTROLUSER AS DEFINED IN YOUR CONFIGURATION FAILED

What is the cause of this error?

First, you have to make sure that your MySQL server is up and running. Since this is trivial and easy to determine, it is most likely not the cause of the error (also, other errors along this one are displayed in that case).

Second, have you recently changed your MySQL Server root password? If answer is YES, then 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:

phpMyAdmin Error Warning - connection for controluser as defined in your configuration failed

phpMyAdmin Error Warning – connection for controluser as defined in your configuration failed

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

/etc/phpmyadmin/config-db.php

or:

/etc/phpMyAdmin/config-db.php

Notice the camelCase difference in the above path names: /phpmyadmin/ and /phpMyAdmin/ are two different directories under Linux operating systems! Under Windows, directory names are not case-sensitive, so above paths will be the one and only (same) directory.

EXAMPLE CONTENT:

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

Categories
PHP Web Development

Comments


  1. comments

    9 Comments

    Add Your Comment
  2. 1. Muzamil Hussain

    I am using window 8. I did’t find config-db.php file in phpmyadmin folder.

  3. 2. TehnoBlog

    Hi, this tutorial is for Linux-based live servers, exclusively. On Windows, you haven’t specified which server environment do you use, possibly IIS or some WAMP/XAMPP dev stack. For example, in XAMPP it is located in /path/to/xampp/phpMyAdmin/config.inc.php. In another words, database credentials are integrated into main phpMyAdmin configuration file:

    /* Authentication type and info */
    $cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = '';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['AllowNoPassword'] = true;

    Maybe it is the same in your case, look for phpMyAdmin installation directory first and check main config file.

  4. 3. bishnu adhikari

    Apparently in my ubuntu 14.4 it shows “bash: cd: /etc/phpmyadmin: No such file or directory”

  5. 4. TehnoBlog

    Under Linux / Ubuntu, phpMyAdmin application itself is/should be [usually] installed in:

    /usr/share/phpmyadmin/

    First, check that you actually have it installed there already.

    Now, /etc/phpmyadmin/ was just an example, if you installed it using official repository with command:

    apt-get install phpmyadmin

    Then, configuration and security part should be in /etc/phpmyadmin/ directory.
    Type commands in terminal:

    user@server:~# cd /etc
    user@server:/etc# dir

    To list all subdirs in your /etc/ directory and see if there is some other similar folder.
    For example:

    phpMyAdmin [notice the camelCase!]

    Or even your server’s Apache folder (or whichever server application you use).

    Another trick that you can use is to check all your Apache’s .conf files in /etc/apache2/ and/or /etc/apache2/conf.d/ dir(s) and see where it calls for phpMyAdmin apache.conf file, there is your location! [Apache is only given as an example here, as it comes pre-configured for default Apache installation under Ubuntu]

    Also, check that your current terminal user with which you are logged-in owns and can access those directories to read, modify etc.

  6. 5. K

    Thank you,

    Regards
    K-

  7. 6. surajit haldar

    hello every one today i have got a problem that in my system i have mysql workbench install, after that i have install xampp but when i used to start phpmyadmin is not working so i have got a solution that i have set the password which i have set in mysql workbench in the config.inc.php file and its working.

  8. 7. Paul

    This fixed my issue when other resources didn’t!

    Thanks!

  9. 8. atozsoft.net

    thank you. worked for me.

  10. 9. kiryamwibo yenusu

    Thank you worked for sure

Post A Comment