21 diciembre, 2024

How to change the definer for views

    Run this SQL to generate the necessary ALTER statements

    SELECT CONCAT(“ALTER DEFINER=`youruser`@`host` VIEW “,
    table_name, ” AS “, view_definition, “;”)
    FROM information_schema.views
    WHERE table_schema=’your-database-name’;

    Copy and run the ALTER statements

How to change the definer for stored procedures

Example:

UPDATE `mysql`.`proc` p SET definer = ‘user@%’ WHERE definer=’root@%’

Fuente: http://stackoverflow.com/questions/10169960/mysql-error-1449-the-user-specified-as-a-definer-does-not-exist

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *