1. ホーム
  2. データベース

mysql reports Access denied; you need (at least one of) SUPER privilege(s) for this operation

2022-02-08 07:59:36

元のSQL文

DROP VIEW IF EXISTS `ACT_ID_GROUP`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ACT_ID_GROUP` AS select `r`. `role_key` AS `ID_`,NULL AS `REV_`,`r`. `role_name` AS `NAME_`,'assignment' AS `TYPE_` from `sys_role` `r` ;


DEFINER制約を削除した修正後のSQL文

DROP VIEW IF EXISTS `ACT_ID_GROUP`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `ACT_ID_GROUP` AS select `r`. `role_key` AS `ID_`,NULL AS `REV_`,`r`. `role_name` AS `NAME_`,'assignment' AS `TYPE_` from `sys_role` `r` ;