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

原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` ;

修改后的sql语句,即删除DEFINER约束

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` ;

 

引伸阅读:

MySQL数据库视图:视图定义、创建视图、修改视图

你可能感兴趣的:(数据库)