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.