When I tried to import my database on my Professional / Entreprise platform, I got a "Definer error". How can I solve this ?

When you try to import import your sql dump to AWS RDS, you can get this kind of error:

Definer error: example: /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER customer_update AFTER UPDATE ON `customer` FOR EACH ROW

This error occurs because Amazon RDS doesn't have Super-User privileges on the Database.

 

You can deal with this error by removing all references to DEFINER if your file using this linux command:

sed -i -e 's/DEFINER=`root`@`localhost`//g' yourfile.sql

Just replace "yourfile.sql" with the name of your sql dump, run the command and import your dump again.

 

Was this article helpful?
0 out of 0 found this helpful