octubre 17, 2016

MySQL error 1449: The user specified as a definer does not exist

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


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

No hay comentarios: