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 user not present in cPanel afer migration from Plesk...

Discussion in 'Migrate to cPanel' started by fucine, Mar 18, 2012.

  1. fucine

    fucine Member

    Joined:
    Jan 28, 2005
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I've recently migrated some domains from a Plesk 9.5.2 box into a WHM/CPanel (11.30.6.4) one. Everything worked out flawlessly, so both MySQL databases and PHP files were correctly transferred, and email accounts as well.
    The strange situation is that under "cPanel > MySQL Databases" I can see the original DBname, but no way to have any reference to originale DBuser (which in this particular case is identical to DBname). Anyway the PHP socket to the DB has been migrated and preserved as it originally was:

    // database values
    $phpwcms['db_host'] = 'localhost';
    $phpwcms['db_user'] = 'string';
    $phpwcms['db_pass'] = '*******';
    $phpwcms['db_table'] = 'string';

    In fact site is up&running, so I do suppose that also "string" DBuser is present, and furthermore I can access phpmyadmin by logging with "string" as DBuser and the corresponding password "*******" as well. I can see the DBname, and manipulate tables, ecc.
    On the other hand the box "Current Users" under "cPanel > MySQL Databases" page states: "There are no users associated with your account".

    Selezione_001.png

    Can someone help in finding where the error resides?
    Should I remap DBuser to DBname via WHM?
    Thanks in advance!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. 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
    Is the database name the same as the cPanel account username? If the cPanel account username is string, the database name is string and the database username is string, only the database would show up in cPanel > MySQL databases as we automatically map cPanel username to have access to the databases under the account.

    I only mention this as I'm not certain if the above is the case or not, since we don't know the actual cPanel account username. That's the only scenario where I know the user will not be listed in cPanel > MySQL databases area. If you have database prefixing turned off (which we recommend for Plesk to cPanel migrations), then you can certainly have a database named string for a cPanel user named string. With database prefixing enabled, you'd end up with string_string instead, since we always force the cPanel username to prepend to the database name with an underscore under prefixing.
     
  4. fucine

    fucine Member

    Joined:
    Jan 28, 2005
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Yes, I do confirm: database name is just the same as database user. And it's also the same as cpanel user. And if I try adding a new database user then I have: "string_" + the name of the user which I'm allowed to freely choose. This is not a weird situation, but quite a strange one. So no way to have - via WHM tweaks (or command line) - the database user "string" beeing mapped to the database name "string", so that it (dbuser named "string") will magically appear in cPanel? Thanks in advance for any possible suggestion.
     
  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
    If the cPanel username is string and the cPanel database username is string, then no you cannot have that user appear in cPanel > MySQL databases area for database users listed. That is because the cPanel username is always allowed to access the MySQL databases and automatically granted privileges to them (for PhpMyAdmin access as one example).

    The cPanel username is also a database user that cannot be removed, which is another reason why it doesn't appear in cPanel > MySQL databases area. If it did show up there, then the client could remove that user and break functionality with services like PhpMyAdmin access.

    That's simply how cPanel works.
     
  6. fucine

    fucine Member

    Joined:
    Jan 28, 2005
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    That's simply a great reply. Case closed and solved. Thanks for in depth explanations!
     
Loading...

Share This Page