The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mysqldump for triggers and procedures.

Discussion in 'Database Discussions' started by gwaland, May 27, 2014.

  1. gwaland

    gwaland Registered

    Joined:
    Jan 12, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    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 <username> -p<pass> <database> > 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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. gwaland

    gwaland Registered

    Joined:
    Jan 12, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    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. :)
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...
Similar Threads - mysqldump triggers procedures
  1. SpiritualWorlds
    Replies:
    6
    Views:
    735

Share This Page