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.

MySQL user loses lock tables privilege every day

Discussion in 'General Discussion' started by veronicabend, Dec 18, 2008.

  1. veronicabend

    veronicabend Well-Known Member

    Joined:
    Feb 25, 2005
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I have manually created a mysql user which doesn't belong to any cpanel account on server. This is a global user which I use for a script that runs daily and does mysqldump of all databases. I created this user by accessing PhpMyAdmin from within WHM, then clicked on Privileges link on first screen there, and added the user. This user only has these privileges:

    select
    show databases
    lock tables

    Every day, I need to go back and manually add the lock tables privilege because it is gone. after I add it, my backup script runs just fine. Then next day when it runs automatically, it sends me an error message. I go look, and the user has lost the lock tables privilege.

    There must be some process in cron removing this privilege.

    Please help me see how I can have this user keep its privileges. Right now my automatic database backup script is useless with this issue. Thanks.
     
  2. dballanc

    dballanc Registered

    Joined:
    Dec 29, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I'm having the same problem.

    I'm also experiencing this. It's maddening. The only way I've been able to work around so far is by using the root password, which is just slightly less unacceptable than having a failing backup script.

    Any information on how to fix the issue correctly would be greatly appreciated.
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    This is done by /scripts/securemysql, which is executed during cPanel updates. To prevent this from happening, perform the following from the command line:

    Code:
    # touch /etc/securemysqldisable
    
     
  4. Ivanner

    Ivanner Active Member

    Joined:
    Oct 13, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Tried this and the user still loses its privileges. His privileges get rolled back to "USAGE"
     
    #4 Ivanner, Mar 18, 2009
    Last edited: Mar 18, 2009
  5. AlexAT

    AlexAT Well-Known Member
    PartnerNOC

    Joined:
    May 23, 2003
    Messages:
    203
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Ukraine
    cPanel Access Level:
    Root Administrator
    For a month I get this problem for different users.
    cPanel support can't help me with it.

    I'll try this command "touch /etc/securemysqldisable" and will see how it goes.
    But customers angry, wery angry.
     
  6. AlexAT

    AlexAT Well-Known Member
    PartnerNOC

    Joined:
    May 23, 2003
    Messages:
    203
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Ukraine
    cPanel Access Level:
    Root Administrator
    Currently I have several customers complain about thos problem.
    So this fix (touch /etc/securemysqldisable) does not help.

    Any ideas?
     
  7. jacampbe

    jacampbe Active Member

    Joined:
    Mar 19, 2008
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    I have found that the cPanel backup job only resets the mySQL privileges for cPanal accounts - ie. those accounts associated with a cPanel domain.
    To avoid this problem use a non-cPanel mySQL account with global privileges (SELECT, LOCK TABLES).
    It works for me.
     
  8. robertjmoore

    robertjmoore Registered

    Joined:
    Aug 21, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    some options for resolving this

    I bumped into this issue yesterday and traced it back through the cPanel update script (and the scripts it calls).

    It looks like some options for fixing this are:
    • touch the securemysqldisable file
    • remove the 'removelockntmp' parameter from the securemysql call in mysqlup
    • restore the MySQL privileges daily by inserting mysql calls into postcpup.

    - Removed -
     
Loading...

Share This Page