Skip navigation

Problem resetting mysql root password

522 Views 0 Replies Latest reply: Jan 20, 2012 2:00 PM by StephenM RSS
StephenM Level 1 Level 1 (110 points)
Currently Being Moderated
Jan 20, 2012 2:00 PM

I have install 5.5.20 from mysql from the TAR file. that install was done from an admin user by the name of mysql. Using the mysql user, I have reached a point where I am unable to reset the root password. I have tried both method of resetting the password with no success. Here is what I did. (path omitted for brevity, but used in the commands)

 

shell>mysqld_safe --skip-grant-tables

shell>mysql

mysql>UPDATE mysql.user SET Password=PASSWORD('newPass')

    -> WHERE User='root';

mysqlQuery OK, 0 rows affected (0.05 sec)

Rows matched: 0  Changed: 0  Warnings: 0

 

shell> mysqld_safe

shell> mysql -u root -p

Enter password:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

 

 

 

created an init file that had ths

--------contents of minit-------

UPDATE mysql.user SET Password=PASSWORD("newPass") WHERE User='root';

FLUSH PRIVILEGES;

------------eof--------------

 

mysqld_safe --init-file=minit

killed mysqld

mysqld_safe

mysql -u root -p

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

 

 

By the way, I closely monitored the .err file and nothing unusual or pacular showed up there.

 

Anyone see what I did wrong? Anyone have other suggestions?

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.