MySQL – Remove definers

Remove definers from mysql dump files.

sed -r -e ‘s/DEFINER=’.+’@’.+’\s//’ < dump.sql  > dump-final.sql

I will update this entry when I can find the blog I found it on just so the person can get credit for it.

Other options is to rename the definers.

UPDATE `mysql`.`proc` p SET definer = ‘newdefiner’ WHERE definer=’olddefiner’ AND db LIKE ‘databasename’;


Posted

in

by

Tags: