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.

Can't create DB User

Discussion in 'Database Discussions' started by vincentg, Mar 30, 2014.

  1. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    For one account the create db user stopped working.

    I tried to install Joomla via Softaculous which failed.
    I then tried to create a database - worked fine.
    Dropped the database - also worked fine.

    Tried to create a user - failed.
    Error stated :
    You, “xxxxxx,” may not create user “xxxxx_test” because it contains unsupported characters. Supported characters include A-Z, a-z, 0-9, and _.

    Password used was test1234

    Viewing log errors shows nothing of interest.

    So what could cause this for only one account on this server?

    I say one account because I do not know of any others but have tested create user on other accounts and it works.
     
  2. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    I notice that this non ascii char is within the html files of the X3 theme
    â€

    I see this several times in adduser.html
    I see it in a few other files also.

    What kind of editor was used that created that?
     
  3. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    The user name and host name need not be quoted if they are legal as unquoted identifiers. Quotes are necessary to specify a user_name string containing special characters (such as “-”), or a host_name string containing special characters or wildcard characters (such as “%”); for example, 'test-user'@'%.com'.

    This is the problem!
    It seems that somewhere down the road they changed the way users are created!!!
    So in my case the user has a dash in the name.

    I think this should be thought out better before a change is made such as this.

    Where do we fix this???
     
  4. Audiopro

    Audiopro Active Member

    Joined:
    Feb 15, 2014
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Can I just confirm something?

    That leaves you with no database
     
  5. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    Since I didn't know why the application installer failed to create the database I created a test db.
    I just wanted to see if it would create a DB so i created a db named test.

    Having done that I then tried to create a user which failed.
    From what I see a recent update March 19th took place which caused this problem.

    From what I have checked it looks to be a MySql error and this is most likely due to passing it without quotes which MySql states will only allow standard chars.
     
  6. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    Looking into it I find that at some point Cpanel had changed the way they create users.
    Long ago it would create a user from a domain named my-host.com as my-host whereas now they remove the dash.

    So I have a website that has the dash in the user name.
    It would be nice if cpanel would tell me how to remove the dash without too much pain or how to fix the script to allow the dash
     
  7. vincentg

    vincentg Well-Known Member

    Joined:
    May 12, 2004
    Messages:
    140
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    new york
    Solved it.

    I never noticed that Cpanel added to modify user the ability to change the user name.

    I changed the user name to remove the dash within the name
    Next problem was to alter any scripts config files
    Also had to alter the Database user names in two tables in the MYSQL db

    All works proper now.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    I am happy to see you were able to successfully modify the account username to a supported format. Thank you for updating us with the outcome.
     
Loading...

Share This Page