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 databases not showing in cPanel

Discussion in 'Database Discussions' started by tmdhosting, Dec 3, 2010.

  1. tmdhosting

    tmdhosting Registered

    Joined:
    Jan 21, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    On a server of mine the MySQL databases stopped showing in cPanel all of sudden. This happened after an automated update of the cPanel software to version 11.28 in which the database mapping was introduced. I have had such an issue on another machine, however, the issue there was resolved by rebuilding the DB Map using:

    /usr/local/cpanel/bin/setupdbmap

    Now that I have tried to run this script, I am getting the following error:

    Code:
    Undefined subroutine &Cpanel::Class::check_package_cache_flag called at /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux/Cpanel/Class/Meta/Class.pm line 417.
    BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/DB/Mysql/Binaries.pm line 8.
    Compilation failed in require at /usr/local/cpanel/Cpanel/DB/Mysql/Connection.pm line 8.
    BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/DB/Mysql/Connection.pm line 8.
    Compilation failed in require at /usr/local/cpanel/bin/setupdbmap line 15.
    BEGIN failed--compilation aborted at /usr/local/cpanel/bin/setupdbmap line 15.
    
    After trying to upgrade cPanel, either with or without --force, the same issue remained, but most notable is that the above mentioned error was shown up during the upgrade, as well.

    I have tried quite a lot of ways to solve the issue, including reinstalling perl, running most of the perl related utilities in the /scripts folder, with or without force mode, as well as searched around for related issues. Still, no joy.

    Mentionable is that newly created databases show up, but the old ones does not.

    Is there anyone that experienced similar/same problem and can s/he share the resolution. It will be much appreciated!
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You might want to put in a ticket directly to cPanel on this for faster results in getting it taken care of.
     
  3. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    sounds like cPanel perl has failed / Not installed

    I had the same issue, I just updated the cp perl and it came back on.
     
  4. a24uall

    a24uall Active Member

    Joined:
    Feb 4, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    Hai..

    I too faced the same problem.
    Solution that worked for me :
    UPDATED perl
    /scripts/checkperlmodules --force
    UPCP to stable version...(Didnt fix)
    Ran upcp in release version. (FIXED here)
    Changed to stable and ran upcp and everything worked fine for me.
     
  5. raghunath

    raghunath Member

    Joined:
    Feb 2, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi Guys,

    This happened to me many times.

    This is what i did to fix it.
    --------------
    Edit line

    disk_usage_include_sqldbs=1 ( you need to set it to '1' if '0' ) in file /var/cpanel/cpanel.config

    And run

    #/scripts/update_db_cache

    --------------
     
    #5 raghunath, Feb 5, 2011
    Last edited: Feb 5, 2011
  6. 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 raghunath,

    These steps you've outlined shouldn't impact databases showing up in cPanel or not. They would impact disk space usage showing up in cPanel > MySQL databases area for the databases, though. As such, I am uncertain how running /scripts/update_db_cache would resolve databases showing up or not showing up in cPanel > MySQL Databases area.

    Also, if you want disk usage to show up for MySQL databases (again, that's what those steps would do), you can change that setting in WHM > Tweak Settings > Include databases in disk usage calculations and change it to "On", then save the area. This is the same setting as /var/cpanel/cpanel.config having "disk_usage_include_sqldbs=1"
     
  7. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi All,

    There are a number of things at play when render database information, be it just the database names or more specific (meta) details about that database. All the fixes mentioned in this post share (many) of the same lower-level routines. This can make troubleshoot the issue very difficult in a forum thread.

    I recommend that anyone having this issue open a support ticket so a technician can analyze it. If there is a persistent bug, it will become very apparent when looking at the aggregate results of our ticket queue. This will not only help resolve your issue faster but can also help make cPanel more robust in future releases.

    Many Thanks,
    -DavidN
     
  8. coderiser

    coderiser Member

    Joined:
    Jan 31, 2011
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    i have seen this as an issue with database mapping not in place for the databases before
     
  9. rachelm

    rachelm Well-Known Member

    Joined:
    Jan 26, 2005
    Messages:
    94
    Likes Received:
    1
    Trophy Points:
    8
    It's a combination of 3 issues. One being something bad in some cpanel updates, two being a botched perl module update process (3rd party issue I think) and 1 and 2 lead to three which is the databases do not map out properly.

    To fix, do the following in the exact order listed (do via ssh).

    /scripts/upcp --force
    /scripts/checkperlmodules --force
    /usr/local/cpanel/bin/setupdbmap

    I had to fix 40 servers with that issue tonight already and the above did the trick every time.

    *edit to clarify*

    1 is caused by some cpanel updates not creating the /var/cpanel/databases folder correctly with the needed base files. Not sure what caused that.

    2 perl modules are glitched once in awhile and need a forced check to reinstall anything that didn't work during a normal upgrade process

    3 is caused by a combination of the above 2 things as the database mapping cannot occur without the proper perl modules and file structure in place.
     
    #9 rachelm, Feb 21, 2011
    Last edited: Feb 21, 2011
Loading...

Share This Page