using this command I changed root password

mysqladmin -u root password fg$pkh@567fghu

And now I cant access mysql. Is this because mysql parse the chars other than what I expect?
Also I completely removed and installed mysql and Problem is extant.
How do I remove mysql so that I get rid of password?

  • More than likely bash is interpreting from the command line. Try using mysql -u root -p then type your password at the prompt.
    – NickW
    Jun 18 '14 at 12:54
  • I already tried that, It's not working Jun 18 '14 at 12:55
  • What exactly is the error message you get from mysql - is there anything in your logs related to this ?
    – user9517
    Jun 18 '14 at 12:57
  • Access denied for user 'root'@'localhost' (using password: YES) Jun 18 '14 at 12:58
  • Well, you could try and set it (again) in an init script as described here: dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
    – NickW
    Jun 18 '14 at 13:09

It looks like you need to reset your password you can try this it should work

service mysqld stop
mysqld_safe --skip-grant-tables &
mysql --user=root mysql
update user set Password=PASSWORD('new-password') where user='root';
flush privileges;

Now stop mysql

pkill mysql

and restart the service

service mysql start

You should be able log on with your new password.

  • 2
    awesome, It worked. You described Thing way better than mysql documentation. Jun 18 '14 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.