美文网首页
MySQL 批量修改视图定义者

MySQL 批量修改视图定义者

作者: 承诺一时的华丽 | 来源:发表于2021-07-12 10:04 被阅读0次
    select TABLE_SCHEMA,TABLE_NAME,DEFINER from information_schema.VIEWS where table_schema='mail_test';
    
    select concat("alter DEFINER='mail_test'@'%' SQL SECURITY DEFINER VIEW ",TABLE_SCHEMA,'.',TABLE_NAME,' as ',VIEW_DEFINITION,';') from information_schema.VIEWS where table_schema='mail_test' AND DEFINER = 'mail@%'; 
    
    

    相关文章

      网友评论

          本文标题:MySQL 批量修改视图定义者

          本文链接:https://www.haomeiwen.com/subject/parrpltx.html