07-20-2023, 02:18 PM
I have a MySQL user called *dump* with the following perms:
GRANT USAGE ON *.* TO 'dump'@'%' IDENTIFIED BY ...
GRANT SELECT, LOCK TABLES ON `mysql`.* TO 'dump'@'%'
GRANT SELECT, LOCK TABLES ON `myschema`.* TO 'dump'@'%'
I want to dump all data (included triggers and procedures) using the *dump* user. I call mysqldump in the following way:
mysqldump -u dump -p --routines --triggers --quote-names --opt \
--add-drop-database --databases myschema > myschema.sql
Everything is OK with the dumped file except for the **triggers, they are missing**!!
The triggers are dumped correctly if I try mysqldump with _root_ MySQL user:
mysqldump -u root -p --routines --triggers --quote-names --opt \
--add-drop-database --databases myschema > myschema.sql
So, I guess it is a perms issue... what are the **extra grants my _dump_ MySQL user needs for doing the full dump correctly?**
GRANT USAGE ON *.* TO 'dump'@'%' IDENTIFIED BY ...
GRANT SELECT, LOCK TABLES ON `mysql`.* TO 'dump'@'%'
GRANT SELECT, LOCK TABLES ON `myschema`.* TO 'dump'@'%'
I want to dump all data (included triggers and procedures) using the *dump* user. I call mysqldump in the following way:
mysqldump -u dump -p --routines --triggers --quote-names --opt \
--add-drop-database --databases myschema > myschema.sql
Everything is OK with the dumped file except for the **triggers, they are missing**!!
The triggers are dumped correctly if I try mysqldump with _root_ MySQL user:
mysqldump -u root -p --routines --triggers --quote-names --opt \
--add-drop-database --databases myschema > myschema.sql
So, I guess it is a perms issue... what are the **extra grants my _dump_ MySQL user needs for doing the full dump correctly?**