0

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.
1
  • 2
    have you set the right username and password in the phpmyadmin config file (config.inc.php)? Commented Oct 4, 2010 at 19:39

2 Answers 2

1

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;
Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.