Reset and then restore mysql password

view full story

http://serverfault.com – I have linux root password. There's MySQL server on that machine. One of the site's ini was rewritten and now it can't reach the mysql database. I don't have mysql root to change the password for database user. The server owner is now in vacation, so I can't ask him to give me the mysql root. I can reset mysql root password, but I don't want. I need: Save current mysql root password hash somewhere Reset it Do the things as mysql root (reset database's user pw) Restore the old root password back How to do the points 1 and 4 ? (HowTos)