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 5.0.91 to MySQL 5.1.48 username problem

Discussion in 'Database Discussions' started by Tymsah, Oct 14, 2010.

  1. Tymsah

    Tymsah Well-Known Member

    Joined:
    Apr 6, 2007
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi,

    today upgrade Mysql 5.0.91 to MySQL 5.1.48 all username cut maximum length 16.

    some customer username length 18-20 .

    hoe can i fix ?


    Regards,
    Tymsah
     
  2. 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 Tymsah,

    Are you stating that previously longer database usernames now aren't working or that you are trying to create a new database username that isn't letting you do so due to the length?

    From my understanding, previously long database usernames should still have been working after the upgrade and you simply cannot have long database usernames going forward. Please clarify if this is impacting already previously created users or this is for a new database user that's trying to be created.

    Thank you.
     
  3. Tymsah

    Tymsah Well-Known Member

    Joined:
    Apr 6, 2007
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi,

    im change mysql database username column length 16 to 20
    and manual update usernames and site is running

    because php files is encoded zend. i cant change db usernames.

    :)
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    MySQL has long had a limitation of 16 characters for the user name. In versions prior to MySQL 5.1 the server would accept user names longer than 16 characters during the authentication handshake.

    Beginning with MySQL 5.1 the database server will either truncate those user names or simply reject the authentication handshake.

    Your recourse is:

    1. Rollback to MySQL 5.0; or
    2. Change the database user names to be 16 characters or less
     
  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
    I had tried to find this documentation previously and wasn't able to find it at that time (while MySQL has great documentation, finding the documentation is sometimes a challenge), and so wasn't sure in my last reply if it was really hard-coded.

    Here's the reference on the 16 character limit for MySQL usernames in MySQL 5.1:

    MySQL :: MySQL 5.1 Reference Manual :: 5.5.1 User Names and Passwords
     
  6. manokiss

    manokiss Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    571
    Likes Received:
    0
    Trophy Points:
    16
    Hi there, wondering if the username length is calculated with the cpanel username on front or without it?
     
  7. 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
    The full length of the username is whatever it shows in cPanel for the MySQL username. If a system has database prefixing on, then the cPanel username will always be prepended to the front of the username with a _ after it. If the system has database prefixing turned off, then the customer determines in cPanel whether to use the cPanel username or not as part of the MySQL username.

    Since MySQL uses the full username selected, it is going to count all characters of the username. You could turn off database prefixing in WHM > Disable Database Prefix if you wish to turn off using the cPanel username at the front of the MySQL username.
     
Loading...

Share This Page