def run(self, mysql_admin_props, init_file=None): p = mysql_admin_props self._check_admin_props(p) cmd = ["-u", p.mysql_user, p.mysql_server_script] if init_file: cmd.append("--init-file=%s" % init_file) procutils.sudo_run_server(cmd, None, p.mysql_startup_logfile, self.ctx.logger, self.ctx._get_sudo_password(self), cwd=p.mysql_server_cwd)