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.
Before I installed XAMPP, I had a MySQL database installed and it had a password. I changed and put the password in config.inc.php for MySQL, and I got this error:
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/xampp/');
exit;
?>
When I try to access index.php, it seems like something is wrong with the XAMPP installation. What can I do to fix this problem?
"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:
or:
Example: (My File looked like this and I changed the user from
phpmyadmin
toadmin
, the username I created for maintaining my database through phpmyadmin, and put in the appropriate password.credits: http://tehnoblog.org/phpmyadmin-error-connection-for-controluser-as-defined-in-your-configuration-failed/
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
:This worked for me with phpmyadmin under Ubuntu 16.04:
I edited /etc/phpmyadmin/config.inc.php and changed the following 2 lines:
I just simply make changes on config.inc.php file. There is password in error in this link $cfg['Servers'][$i]['password'] = 'your password '; and now its perfectly worked .
If you got here and you are using Debian/Ubuntu (or any other dpkg based distro), execute the following command:
The phpmyadmin package contains the script to perform this operation for you, all it needs is a user with permissions. sudo is not required if you're logged in as root, of course.
EDIT: It might be worth trying to drop the current phpmyadmin user.