When I execute a SQL script of the dump of a database structure and data, occurs an error “The user specified as a definer
'xxx'@'%' does not exist”.
SQL Error (1449)：The user specified as a definer ('xxx'@'%') does not exist
This commonly occurs when exporting views/triggers/procedures from one database or server to another as the user that created that object no longer exists.
For example, the following is a trigger create statement:
This is possibly easiest to do when initially importing your database objects, by removing any
DEFINER=some_user from the dump.
Changing the definer later is a more little tricky. You can search solutions for “How to change the definer for views/triggers/procedures”.
If you’ve found following error while using MySQL database:
The user specified as a definer ('some_user'@'%') does not exist`
Then you can solve it by using following :
CREATE USER 'some_user'@'%' IDENTIFIED BY 'complex-password';
My exported trigger has a definer user that does not exist.
When you insert data into the table used in the trigger, MySQL will occur the error “The user specified as a definer
xxx does not exist”.