How do I fix «The user specified as a definer ('<user>'@'%') does not exist»?

GRANT ALL ON *.* TO '<user>'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

stackoverflow.com/a/39701619

Another solution:

mysqldump <database> > dump.sql
sed -i 's/DEFINER=`<name>`@`<host>`//g' dump.sql
mysql -e "DROP DATABASE <database>; CREATE DATABASE <database>;" && mysql <database> < dump.sql

You can check whether an SQL dump contains a DEFINER with the expression:

grep 'DEFINER' dump.sql