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 username prefix not being truncated

Discussion in 'Database Discussions' started by DanH42, Nov 1, 2016.

Tags:
  1. DanH42

    DanH42 Active Member

    Joined:
    Sep 11, 2011
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Bloomington, IL
    cPanel Access Level:
    Root Administrator
    I noticed recently one of our cPanel servers (v58) has stopped truncating usernames for database prefixes. This reduces the number of characters left for usernames to sometimes only a couple characters, and for longer usernames completely prevents the creation of MySQL users:
    [​IMG]

    What could have caused this? How do I get the truncation back working the way it was?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,094
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This relates to the following change documented in the cPanel 56 Release Notes:

    However, the issue you have reported is not the behavior I see on a test system. You should be able to create longer database names and database usernames while maintaining the longer prefix. Check to see if the following directories exist on this system:

    /var/lib/mysql/.ssh
    /var/lib/mysql/.cpanel


    If so, move these directories out of the way, and restart MySQL, via the following commands:

    Code:
    mkdir /home/backup-mysql
    mv /var/lib/mysql/.ssh /home/backup-mysql/
    mv /var/lib/mysql/.cpanel /home/backup-mysql/
    /scripts/restartsrv_mysql
    Let us know if this helps.

    Thanks!
     
  3. DanH42

    DanH42 Active Member

    Joined:
    Sep 11, 2011
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Bloomington, IL
    cPanel Access Level:
    Root Administrator
    Neither of those directories exist in /var/lib/mysql, nor are there any other hidden directories.

    In addition to the length issue, I'm also unable to grant new privileges to users created before v56:
    [​IMG]

    In the image above, I'm trying to add grants for an old MySQL user called extremem_sso. Something is getting crossed somewhere, and cPanel is adding an additional prefix to the already-prefixed username, resulting in "extrememotors_extremem_sso" which isn't a real user. This happens whether I'm granting privileges on a newly created database or on one that has an old truncated prefix. Even if I can get the username length issue solved, this prefix mismatching is still going to be an issue.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,094
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here and I'll make sure the thread is updated with the outcome.

    Thank you.
     
  5. DanH42

    DanH42 Active Member

    Joined:
    Sep 11, 2011
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Bloomington, IL
    cPanel Access Level:
    Root Administrator
    Opened support request #7875831.
     
  6. DanH42

    DanH42 Active Member

    Joined:
    Sep 11, 2011
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Bloomington, IL
    cPanel Access Level:
    Root Administrator
    After some great sleuthing by a couple cPanel support folks, it turns out the issue was related to a bug in the x3 theme, which we still used on all our servers. Switching an account over to Paper Lantern fixes both issues we were seeing.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,094
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I'm happy to see the issue is now resolved. Thank you for taking the time to update this thread with the outcome. More information on converting accounts to the Paper Lantern theme is available on the following thread:

    X3 is no more so need help in bulk Action

    Thanks!
     
Loading...

Share This Page