tags:

views:

76

answers:

2

I want to remove the password for user root in localhost. How can I do that? By mistake I have set the password of root user. That's why phpmyadmin is giving an error:

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

A: 

You have to set a blank password using:

SET PASSWORD [FOR user] =
{
    PASSWORD('some password')
  | OLD_PASSWORD('some password')
  | 'encrypted password'
}

In this case I think you have to do something like:

SET PASSWORD FOR root@localhost=PASSWORD('');
Dario
how can I reset password for a perticular database?
nectar
A: 

The MySQL documentation contains instructions on how to reset the root password in case you have forgotten it.

Michael Madsen