-- 函数、存储过程
select definer from mysql.proc;
update mysql.proc set definer=‘[email protected]%‘;
-- 定时事件
select DEFINER from mysql.EVENTS;
update mysql.EVENTS set definer=‘[email protected]%‘;
--视图
select DEFINER from information_schema.VIEWS;
select concat("alter DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW ",TABLE_SCHEMA,".",TABLE_NAME," as ",VIEW_DEFINITION,";") from information_schema.VIEWS where DEFINER<>‘[email protected]%‘;
--触发器
select DEFINER from information_schema.TRIGGERS;
时间: 2024-11-02 20:43:57