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.

pkgacct - "no such grant defined for user" - Cpanel/Mysql.pm line 515

Discussion in 'General Discussion' started by aww, Dec 9, 2011.

  1. aww

    aww Well-Known Member

    Joined:
    Feb 10, 2005
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    WHM 11.30.5 (build 2) CENTOS 5.7 i686 virtuozzo

    Getting this error on virtually any account when trying to do a backup

    Determining mysql dbs...DBD::mysql::st execute failed: There is no such grant defined for user 'example' on host 'host.example.com' at /usr/local/cpanel/Cpanel/Mysql.pm line 515.
    DBD::mysql::st execute failed: There is no such grant defined for user 'example' on host 'host.example.com' at /usr/local/cpanel/Cpanel/Mysql.pm line 515.


    At first I though it was only accounts that were imported from elsewhere but I don't think that's the cause?

    I found one other obscure mention of this on the web from just last month:
    Apparent MySQL backup error when using cPanel backup - The SpeedySparrow Community
     
  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 :)

    That error indicates there are no grants defined for that MySQL user. It's possible some of the settings in your /etc/my.cnf file are causing this behavior. Could you open a ticket with our support staff so we may check further? You can open a ticket using the following URL:

    Submit A ticket

    Please post the ticket number here so we may track the issue.

    Thank you.
     
  3. aww

    aww Well-Known Member

    Joined:
    Feb 10, 2005
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Apparently this bug has been going on since at least 2006

    https://forums.cpanel.net/f5/mysql-errors-cpbackup-39130.html

    But I guess no-one submitted a ticket or followed up on it.

    Looking at the server I do not see anything wrong.

    Looks like it does happen on every single account, so you are right, it may be a my.cnf setting.

    I think all of them were imported from plesk at some point - actually no, I know I created two of them manually with a mysql import.

    There are zero operational problems, only the backup warnings, and I sure hope it's actually a warning and they are being backed up anyway, but maybe not.

    SHOW GRANTS FOR user@localhost; does actually work and shows "grant all privileges"

    Maybe one of the my.cnf settings actually removes a type of grant that is possible, and cpanel's export asks for that grant by default.
     
  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
    I still suggest opening a support ticket, as it's highly unlikely to be related to the previous forum post you referenced. If you can open a ticket, feel free to post the ticket number so we may follow up.

    Thank you.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    I would like to provide an update to this forum thread. The issue with this error is caused by having "skip-name-resolve" in /etc/my.cnf file, which causes the grants other than localhost to be skipped.

    The reason the grants are expected is that cPanel does have them listed in /var/cpanel/databases for the grants files, but they cannot resolve due to that /etc/my.cnf entry for skipping name resolution. If you want the backups to not output that error, the entry for "skip-name-resolve" would need to be removed from /etc/my.cnf file and MySQL restarted.
     
  6. nimbar

    nimbar Registered

    Joined:
    Mar 27, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    In my case: skip-name-resolve was causing issues resolving my hostname.

    cPanel kindly fixed the issue for me :)
     
  7. aww

    aww Well-Known Member

    Joined:
    Feb 10, 2005
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    skip-name-resolve increases performance since DNS lookups are bypassed

    - I can live with the errors as long as it's technically a warning and not fatal (ie. doesn't prevent the backup)

    From what I understand, the grants could be determined if the hostname was an IP - is it possible to set mysql hostnames to the shared IP via my.cnf? Or would the grant table have to be edited (probably a bad idea). I guess localhost could in theory be changed to 127.0.0.1 but the repercussions are unknown (also unknown if it would solve the grant error)
     
    #7 aww, Jan 11, 2012
    Last edited: Jan 11, 2012
Loading...

Share This Page