MySQL databases not showing in cPanel

tmdhosting

Registered
Jan 21, 2009
1
0
51
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!
 

GaryT

Well-Known Member
May 19, 2010
320
3
68
sounds like cPanel perl has failed / Not installed

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

a24uall

Active Member
Feb 4, 2010
27
0
51
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.
 

raghunath

Member
Feb 2, 2011
12
0
51
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

--------------
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello raghunath,

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
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"
 

cPanelDavidN

Well-Known Member
Staff member
Dec 17, 2009
571
3
68
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
 

coderiser

Member
Jan 31, 2011
18
0
51
i have seen this as an issue with database mapping not in place for the databases before
 

rachelm

Well-Known Member
Verifed Vendor
Jan 26, 2005
94
1
158
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.
 
Last edited: