Added exit code to mysql_demote