Objectives of the blog
To learn how to fix the issue “The user specified as a definer (‘xyz’@’localhost’) does not exist” in MySQL. It can be any value in place of ‘xyz’.
This error has occurred because you have defined different users in Definer and using other accounts in MySQL.
So while creating Triggers, you should use the “root@localhost” in the Definer. Follow the below steps to resolve this error:
Step 1: Open phpMyAdmin
Step 2: Select your database and table
Step 3: Click on the “Triggers” tab from the top of the page
Step 4: Click on the “Edit” to edit triggers.
Step 5: Change Definer from xyz@localhost to root@localhost
For more details check this screenshot: