Sample Header Ad - 728x90

Reset of root password not working?

2 votes
3 answers
888 views
Our previous DBA left and didn't note the root password down, and I've been pressganged into doing part of his job until we can hire someone. So I create a file : /root/mysql.password Inside that file, I have: UPDATE mysql.user SET Password=PASSWORD('newpassword') WHERE User='root'; So I do a clean shutdown of the database, and then: mysqld_safe --init-file=/root/mysql.password I get 'starting mysqld' ... and then it exits with code 1. I don't get it. What's wrong with that file? Using .. mysqld_safe --skip-grant-tables & .. isn't an option, unfortunately, as it's a public-facing production box. Thanks.
Asked by John T. (21 rep)
Feb 12, 2014, 07:11 AM
Last activity: May 21, 2018, 07:16 AM