Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    166
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,491
    Likes Received:
    1,964
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. aww

    aww Well-Known Member

    Joined:
    Feb 10, 2005
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    166
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,491
    Likes Received:
    1,964
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. nimbar

    nimbar Registered

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

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

    cPanel kindly fixed the issue for me :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. aww

    aww Well-Known Member

    Joined:
    Feb 10, 2005
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    166
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice