Better way to set MySQL password for all the root accounts

(cherry picked from commit d7c89faf7420270b46622f4c4acd82a19bf9ce95)