tags:

views:

37

answers:

2

I'm getting this error when I attempt to run phpMyAdmin from XAMPP. There was an existing mysql installation on this machine previous to my installation and running of XAMPP. When I start XAMPP both mysql and apache2 start up successfully. I can access the mysql database with a PHP script but not through phpmyadmin.

Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
A: 

Do you have a password set for the root user? You shouldn't connect via root but check that. I also recall having issue with one of the version of phpmyadmin where I wasn't allowed to log in with the root user.

luckytaxi
+1  A: 

If you want to access mysql as root without a password, in your /xampp/phpMyAdmin/config.inc.php file ensure the following variables are being set:

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
webbiedave