Better guard around update mysql root password

This is #233 rebased on top of the latest master.