Mysql修改mysql的视图定义者
一、查看所有视图的库名、表名、定义者select TABLE_SCHEMA,TABLE_NAME,DEFINER from information_schema.VIEWS;二、生成alter VIEW的SQLselect concat("alter DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW ",TABLE_SCHEMA,".",TABLE_NAME," as ",VIEW_DEFINITION,";") from information_.
原创
2021-07-22 10:26:45 ·
2030 阅读 ·
1 评论