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.
on ubuntu 18.04 in etc/phpmyadmin/config.inc.php
comment all the block
Optional: User for advanced features
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';`
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.
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.
"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
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/