diff --git a/app/http/controllers/plugins/mysql57/mysql57_controller.go b/app/http/controllers/plugins/mysql57/mysql57_controller.go index 6a7340b9f8..8087b89a4e 100644 --- a/app/http/controllers/plugins/mysql57/mysql57_controller.go +++ b/app/http/controllers/plugins/mysql57/mysql57_controller.go @@ -311,7 +311,7 @@ func (c *Mysql57Controller) SetRootPassword(ctx http.Context) http.Response { return controllers.Error(ctx, http.StatusInternalServerError, "MySQL 未运行") } - rootPassword := ctx.Request().Input(models.SettingKeyMysqlRootPassword) + rootPassword := ctx.Request().Input("password") if len(rootPassword) == 0 { return controllers.Error(ctx, http.StatusUnprocessableEntity, "MySQL root密码不能为空") } diff --git a/app/http/controllers/plugins/mysql80/mysql80_controller.go b/app/http/controllers/plugins/mysql80/mysql80_controller.go index b3d82a8316..7c4975e288 100644 --- a/app/http/controllers/plugins/mysql80/mysql80_controller.go +++ b/app/http/controllers/plugins/mysql80/mysql80_controller.go @@ -311,7 +311,7 @@ func (c *Mysql80Controller) SetRootPassword(ctx http.Context) http.Response { return controllers.Error(ctx, http.StatusInternalServerError, "MySQL 未运行") } - rootPassword := ctx.Request().Input(models.SettingKeyMysqlRootPassword) + rootPassword := ctx.Request().Input("password") if len(rootPassword) == 0 { return controllers.Error(ctx, http.StatusUnprocessableEntity, "MySQL root密码不能为空") }