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.

Unable to create a database issue

Discussion in 'Database Discussions' started by wickedmx, May 15, 2016.

  1. wickedmx

    wickedmx Registered

    Joined:
    May 4, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I have run into a serious bug since recently upgrading my 3 servers to WHM 56. The issue affects any cPanel account that was created with a username longer than the traditional 8 characters and results in the following occurring:

    1) When trying to use Installatron to install an application, the installation fails with the following error (example only):

    Error
    Unable to create a database. Check that your hosting account has at least one database available. If it does, please contact your host.

    Technical Error: The database “xxxxxxxxxxxxxx_afmo1” already exists.
    `xxxxxxxx_afmo1'

    2) If then try to manually install the application; the creation of a database works just fine, but when I then try to run the application's installation process, it complains that it cannot connect to the database even though all details are entered correctly.

    I have tested the process across 3 servers, all running WHM 56 (Build 14) and MariaDB 10.0.25, with the same results. I have also tested installing different applications, again with the same result.

    Accounts that were created with the traditional 8 character limit are unaffected as their cPanel and MySQL/MariaDB usernames match up.

    Any advice on a fix for this?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,738
    Likes Received:
    661
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    MySQL username limits are documented at _MySQL Username Limit - Documentation - cPanel Documentation :
    This seems like an issue with the specific plugin you are using, if that's the only time you notice the issue. Have you verified that the servers are using the latest version of the Installatron plugin, and if so, have you reported the issue to their support team?

    Thank you.
     
  3. wickedmx

    wickedmx Registered

    Joined:
    May 4, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the reply Michael, however, the issue is not specific to Installatron as it also occurred when attempting a manual installation completely independent of Installatron.

    After looking at the documentation, the only way around this I believe is to disable the inclusion of the username prefix for new databases. However, on a shared server this is not ideal as the username at the front makes it much easier to manage a large number of databases across many users.

    The problem only exists for accounts that are manually created via WHM, as this defaults to the newer naming protocol that allows usernames up to 16 characters. So this is mostly affecting resellers that are still using the WHM account creation process.

    Is there a way to force cPanel to only create users with the previous 8 character limit?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,738
    Likes Received:
    661
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you provide us with a method to reproduce the issue that does not involve a third-party application? Or, are you stating that any database creation attempt outside of our API or user-interface results in this issue?

    Thank you.
     
  5. Stefanfan

    Stefanfan Registered

    Joined:
    Jun 17, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    NSW, Australia
    cPanel Access Level:
    Reseller Owner
    I ran into this issue today, as well.
    1. Use WHM to create an Account manually, using more than 8 characters for the username.
    2. Log on to cPanel for the Account you created
    3. Install WordPress with the default options.
    The installation fails early with the error described above.
    I worked around the issue by terminating the account I had created, and then re-creating it with an 8-character username.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,738
    Likes Received:
    661
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I'm unable to reproduce this issue when installing WordPress via the "Site Software" option in cPanel. Could you clarify if you are using a third-party application such as Installatron to install WordPress? I've seen reports of this problem for other control panels on the Installatron forums and the issue was resolved by the Installatron development team.

    Thank you.
     
Loading...

Share This Page