#修改存储过程、函数、事件、触发器、视图的 DEFINER
select definer from mysql.proc;
update mysql.proc set definer='billing@%';

select DEFINER from mysql.EVENTS;
update mysql.EVENTS set definer='billing@%';

select DEFINER from information_schema.VIEWS; 
select concat("alter DEFINER=`billing`@`%` SQL SECURITY DEFINER VIEW ",TABLE_SCHEMA,".",TABLE_NAME," as ",VIEW_DEFINITION,";") from information_schema.VIEWS where DEFINER<>'billing@%'; 

select DEFINER from information_schema.TRIGGERS;
drop trigger upc.t_trigger1;

DELIMITER ;;
CREATE DEFINER=`billing`@`%` trigger upc.t_trigger1 before delete on upc.sys_sequences   for each row 
begin
insert into upc.sys_sequences_bak values(2,old.SEQUENCE_NAME,old.START_BY,old.INCREMENT_BY,old.LAST_NUMBER,old.JVM_STEP_BY,now());
end;;
DELIMITER ;

版权声明:QQ:597507041

相关文章:

  • 2021-12-21
  • 2021-11-12
  • 2021-12-28
  • 2021-05-11
  • 2021-05-28
猜你喜欢
  • 2021-10-15
  • 2022-12-23
  • 2021-06-22
  • 2021-12-20
  • 2021-09-04
  • 2021-11-27
  • 2022-12-23
相关资源
相似解决方案