0

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?

6
  • More than likely bash is interpreting from the command line. Try using mysql -u root -p then type your password at the prompt. Commented Jun 18, 2014 at 12:54
  • I already tried that, It's not working Commented Jun 18, 2014 at 12:55
  • What exactly is the error message you get from mysql - is there anything in your logs related to this ? Commented Jun 18, 2014 at 12:57
  • Access denied for user 'root'@'localhost' (using password: YES) Commented Jun 18, 2014 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 Commented Jun 18, 2014 at 13:09

1 Answer 1

6

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; exit; 

Now stop mysql

pkill mysql 

and restart the service

service mysql start 

You should be able log on with your new password.

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.