reshma kr
reshma kr

Reputation: 938

error #1045 - Access denied for user 'root'@'localhost' in phpmyadmin

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.

Even after uninstalling wamp and then reinstalling it's showing the same error.

Upvotes: 1

Views: 2292

Answers (1)

Isaac Bennetch
Isaac Bennetch

Reputation: 12422

You can try connecting via the command-line interface using the username and password you expect; if that doesn't work then I presume you'll need to reset your password.

The MySQL manual has detailed instructions for resetting a lost root password.

Generically, those instructions are:

  1. Start MySQL with the --skip-grant-tables option
  2. Connect via the command line client with mysql (or the Start Menu program that corresponds to the command line client).
  3. Run FLUSH PRIVILEGES to load the privilege table
  4. Reset the password with a command like SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass'); adjusting the username, host, and password as needed.
  5. Stop and re-start the MySQL server.

Upvotes: 1

Related Questions