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.

problem creating a new mysql user in cpanel

Discussion in 'Database Discussions' started by wowrack, Feb 16, 2010.

  1. wowrack

    wowrack Member
    PartnerNOC

    Joined:
    Dec 18, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I've tried to created a new user in the MySQL database section of the cpanel. It let's me create a database, but a problem occurred when adding a new user.
    When I press the "Create User" button, i got :

    Added user xxx with the password xxx

    Bun when I click "Go Back", I can't find user xxx in the Current Users table at the bottom.

    I've tried this multiple times and I still got the same problem.
    Can you help me out with this?
    Any help would be appreciated.

    Thank you. :)
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    To help diagnose and troubleshoot the issue, please let us know the following information, (numbered for clarity):
    1.) What is the full cPanel version and build number?
    2.) Does phpMyAdmin load OK via root access to WHM?
    3.) Does phpMyAdmin load OK via the end-user's cPanel while logged-in using their cPanel username and password?
    4.) Is there a MySQL root password set?

    For reference, the full cPanel version and build number may be obtained using the following command via SSH access:
    Code:
    # cat /usr/local/cpanel/version && echo
     
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Adding to the above information, are there any errors or other messages logged at the same time when attempting to create the new MySQL user and also when viewing the MySQL Databases page in cPanel to list the MySQL users?

    The following command may be used to monitor ("tail") the cPanel error log for new messages while testing:
    Code:
    # tail -fvn0 /usr/local/cpanel/logs/error_log
     
  4. wowrack

    wowrack Member
    PartnerNOC

    Joined:
    Dec 18, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    1.) What is the full cPanel version and build number?
    root@server [~]# cat /usr/local/cpanel/version && echo
    11.25.0-RELEASE_43286

    2.) Does phpMyAdmin load OK via root access to WHM?
    no, it doesn't

    3.) Does phpMyAdmin load OK via the end-user's cPanel while logged-in using their cPanel username and password?
    yes, it does

    4.) Is there a MySQL root password set?
    there is no MySQL root password set

    5)
    root@server52 [~]# tail -fvn0 /usr/local/cpanel/logs/error_log
    ==> /usr/local/cpanel/logs/error_log <==
    DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL s erver through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/cpanel/Cpanel /Mysql.pm line 37
    [2010-02-17 09:46:18 -0800] info [mysqladmin] Not updating privileges for fremon tfair (reseller login and no password specified in ~/.my.cnf)
    DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL s erver through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/cpanel/Cpanel /Mysql.pm line 37
    DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL s erver through socket '/var/lib/mysql/mysql.sock' (2) at /usr/local/cpanel/Cpanel /Mysql.pm line 37
    Can't call method "prepare" on an undefined value at /usr/local/cpanel/Cpanel/My sql.pm line 117.
    DBD::mysql::st execute failed: The MySQL server is running with the --skip-grant -tables option so it cannot execute this statement at /usr/local/cpanel/Cpanel/M ysql.pm line 1136.
    DBD::mysql::st fetchrow_arrayref failed: fetch() without execute() at /usr/local /cpanel/Cpanel/Mysql.pm line 1137.
    [2010-02-17 09:46:35 -0800] info [mysqladmin] Not updating privileges for fremon tfair (reseller login and no password specified in ~/.my.cnf)


    Thanks for your help..
     
  5. wowrack

    wowrack Member
    PartnerNOC

    Joined:
    Dec 18, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Dear cPanelDon,

    Running these commands fixed the problem.

    /scripts/mysqlup --force
    /usr/local/cpanel/bin/updatephpmyadmin --force
    /scripts/upcp --force

    thank you for your reply.

    update: looks like the problem was the mysql username cannot exceed 16 characters. ex: fremontfair_pano (valid), and fremontfair_pano1 is not valid one. but there was no error msg indicating this.


    Regards,
    Wowrack
     
    #5 wowrack, Feb 17, 2010
    Last edited: Feb 17, 2010
  6. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Thank you for the details. If there is no MySQL root password set this will cause difficulty when using normal functions that integrate with MySQL; I recommend ensuring that there is a MySQL root password set; this may be performed via the following menu path in WHM:
    WHM: Main >> SQL Services >> MySQL Root Password

    I was unable to reproduce the issue regarding a long MySQL username; the text entry field in cPanel X3 used for MySQL user creation enforces a maximum of 7 characters allowed for the username. I would ensure the cPanel account is set to use the X3 theme (and not an older or legacy theme).
     
  7. mpkossen

    mpkossen Member

    Joined:
    Jul 19, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Still an issue here:

    11.26.16-CURRENT_49279

    It allows only 7 characters for a username, but doesn't check the overall username character limit of 16. The database name field does this, however, it only does this at the 19th character.

    So:

    Database name: phpfusion_phpfusio (18) is allowed
    Database name: phpfusion_phpfusion (19) is NOT allowed because "Database name cannot be longer than 16 characters."

    Username: phpfusion_phpfusi (17) is allowed and apparently being created, but not really.
    Username: phpfusion_phpfus (16) is allowed and being created.
     
    #7 mpkossen, Oct 1, 2010
    Last edited: Oct 1, 2010
  8. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Thank you for the information. I would like to reproduce the issue, but I will need to know how the cPanel account was setup (where the username length is greater than 8 characters). Please clarify what method was used to create the affected cPanel account with a username longer than 8 characters. The length of a cPanel account username is normally limited to a maximum of 8 characters, assuming it was originally created directly via cPanel/WHM. Was the account transferred or migrated from a different control panel system?

    If a bug is suspected please note that the best avenue to report it is via our ticket system, such as by using the link in the top-right corner of the forums, labeled Bugs; using this method to directly Submit a Bug Report helps to ensure greater efficiency during investigation, accuracy in diagnosis, and faster resolution. Thank you for your understanding.
     
    #8 cPanelDon, Oct 2, 2010
    Last edited: Oct 4, 2010
  9. ethical

    ethical Well-Known Member

    Joined:
    Apr 7, 2009
    Messages:
    79
    Likes Received:
    2
    Trophy Points:
    8
    I also see this bug. For creating both cpanel usernames and mysql databases it does not restrict me as it used too do. Am using firefox 3.6.13 and WHM 11.28.64

    this was doing within the WHM interface
     
Loading...

Share This Page