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.

Incorrect MySQL Database Count

Discussion in 'Database Discussions' started by SomeoneX, Jun 15, 2009.

  1. SomeoneX

    SomeoneX Member

    Joined:
    Aug 24, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I'm having a problem with my cPanel server.

    All accounts are experiencing this problem. Even though it's a new account :confused:

    The MySQL database count is +1 than the correct number.

    So, if I have 3 MySQL databases, cPanel will show it as 4.

    Any solution?

    Thanks you very much. :)
     
  2. serversignature

    serversignature Well-Known Member

    Joined:
    Nov 26, 2007
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bangalore
    please open a support ticket with cpanel from your WHM
     
  3. jimchacko

    jimchacko Member

    Joined:
    Sep 30, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Any updates on this. Got the same issue here.
     
  4. krizag

    krizag Member

    Joined:
    Jun 19, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Try updating pqsql if it is installed in the server. This should fix it.
     
  5. afernandez

    afernandez Member
    PartnerNOC

    Joined:
    Jun 3, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I have the same issue, but for all accounts in my server.
    The PostgreSQL version is 8.3.7 and my cpanel/whm verisions are cPanel 11.24.4-R36167 - WHM 11.24.2 in the server with this issue, and the same version in my others servers don't have this inconvenience.

    Any idea about how to fix this?
     
  6. SomeoneX

    SomeoneX Member

    Joined:
    Aug 24, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Have you trieed this method, afernandez?
     
  7. jimchacko

    jimchacko Member

    Joined:
    Sep 30, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Updating postgres in the server will work. In our case the postgres was not installed correctly in the server.

    Thanks
     
  8. HstSupport

    HstSupport Registered

    Joined:
    Jul 3, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    So what version is required for postgresql to correct this MySQL DB counter problem?
     
  9. romulob

    romulob Active Member
    PartnerNOC

    Joined:
    Apr 29, 2008
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    I don't understand why installing PostGreSQL would fix a problem with MySQL database counter.

    If you're getting the number of databases + 1, that is probably because cPanel is counting the information_schema database. Try hiding that database to see if it works correctly.

    1) Open /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php and add the following line:

    $cfg['Servers'][$i]['hide_db'] = 'information_schema';
     
  10. WebGraf

    WebGraf Member

    Joined:
    Feb 13, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    information_schema is hidden
    but the MySQL database count is +1 than the correct number!
     
  11. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    The issue can be easily caused by an incorrectly or partially setup PostgreSQL installation, hence why correcting this often alleviates the issue. If PostgreSQL is not in use then it should not be installed to begin with and should be fully removed by the server administrator.

    I am not aware of the described scenario ever occurring; this should not happen under any circumstances.

    What is the full cPanel version and build number of the system?

    Are any PostgreSQL software packges installed (e.g., installed RPMs)? What is the output of the following command via root SSH access?
    Code:
    # rpm -qa | grep -i "postgresql\|pgsql" | sort
    Please see the following thread for additional reference information: Incorrect database counts after restore. - cPanel Forums
     
  12. WebGraf

    WebGraf Member

    Joined:
    Feb 13, 2010
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    # rpm -qa | grep -i "postgresql\|pgsql" | sort
    postgresql-8.1.18-2.el5_4.1
    postgresql-devel-8.1.18-2.el5_4.1
    postgresql-libs-8.1.18-2.el5_4.1

    Install Postgres Config
    Failed to locate postgresql user
    Failed to locate postgresql user

    then I replaced 1 on 0 in /home/username/.cpanel/datastore/postgres-db-count

    count db is good

    sorry for bad English
     
    #12 WebGraf, Feb 18, 2010
    Last edited: Feb 18, 2010
  13. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Please note that manually changing the database count in the datastore "db-count" (cache) file will not correct the problem and the issue will reoccur until it is resolved. To correctly resolve the issue it is necessary to either fully remove PostgreSQL or to complete the installation; having only the PostgreSQL RPMs installed without performing the other steps will result in an incomplete configuration.

    To properly install and setup PostgreSQL please carefully review the step-by-step installation guide detailed in the following documentation resource: Installing PostgreSQL on your cPanel/WHM Server
     
Loading...

Share This Page