Reset of root password not working? 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 &amp;


.. isn't an option, unfortunately, as it's a public-facing production box.

Thanks.
The very first thing you should do is take a backup of your database using mysqldump or similar, because if you mangle something, your root password will be useless anyway.