mysqldump for triggers and procedures.
I've run into a case where one of my customers is attempting to do an hourly dump of their mysql database and wants to include the procedures and triggers with it. When they do a 'mysqldump -R -h db.server.priv -u -p > filename.sql' it gives them a warning " insufficent privileges to SHOW CREATE PROCEDURE"
Looking into this it looks like the user needs select priviliges on the mysql.proc which I'm hesitant to do since this essentially grants them access to parts of the mysql database. Does anyone know of a work around for this or a permission I can grant in cpanel itself to allow them to do regular backups of just the database (with procedures and triggers) from the command line without having to provide their user this GRANT?
Thanks.
-
Hello :) Have you considered setting up the cron job for them as "root", and then setting it to copy the database to their account after it's dumped? Thank you. 0 -
It's an option I have considered. As you can imagine, one off custom setups are something I try to avoid for customers on the cpanel systems. As such I thought I'd see if there was another solution already available in cpanel. I'm sure I'm not the first person to have customers who use stored procedures in their databases. If I have to go with one of the options so be it. But I thought I'd check first. :) 0 -
There is a recent thread about backing up accounts with cPanel credentials through our API that you might find helpful as proof of concept: Backing Up Accounts through API Thank you. 0
Please sign in to leave a comment.
Comments
3 comments