Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    aww
    aww is offline
    Member
    Join Date
    Feb 2005
    Posts
    81
    cPanel/Enkompass Access Level

    Root Administrator

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

    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. #2
    cPanel Staff cPanelMichael's Avatar
    Join Date
    Apr 2011
    Posts
    1,346
    cPanel/Enkompass Access Level

    Root Administrator

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

    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.
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists - Documentation - Migration Services
    -- cPanelMichael - Migration Specialist, Technical Analyst, cPanel Technical Support

  3. #3
    aww
    aww is offline
    Member
    Join Date
    Feb 2005
    Posts
    81
    cPanel/Enkompass Access Level

    Root Administrator

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

    Apparently this bug has been going on since at least 2006

    https://forums.cpanel.net/f5/mysql-e...kup-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. #4
    cPanel Staff cPanelMichael's Avatar
    Join Date
    Apr 2011
    Posts
    1,346
    cPanel/Enkompass Access Level

    Root Administrator

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

    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.
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists - Documentation - Migration Services
    -- cPanelMichael - Migration Specialist, Technical Analyst, cPanel Technical Support

  5. #5
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

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

    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.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  6. #6
    Registered User
    Join Date
    Mar 2006
    Posts
    4

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

    Hello,

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

    cPanel kindly fixed the issue for me

  7. #7
    aww
    aww is offline
    Member
    Join Date
    Feb 2005
    Posts
    81
    cPanel/Enkompass Access Level

    Root Administrator

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

    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)
    Last edited by aww; 01-11-2012 at 03:56 PM.

Similar Threads & Tags
Similar threads

  1. Replies: 3
    Last Post: 11-01-2011, 08:29 AM
  2. Replies: 1
    Last Post: 07-04-2011, 02:10 AM
  3. cPanel Setup Error: "ReferenceError: YAHOO is not defined."
    By Nima304 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-26-2010, 06:53 AM
  4. Grant user FTP access to "RESTRICTED" directories
    By Roy@ENHOST in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-24-2004, 06:13 PM
  5. Mysql Erorr "1064 line 1" !!
    By 4I1 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-21-2003, 04:11 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube