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 database counts after restore.

Discussion in 'General Discussion' started by nxweb, Oct 28, 2009.

  1. nxweb

    nxweb Active Member

    Joined:
    Oct 29, 2008
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    I recently restored a large amount of sites on a server from backups after an OS reload. However, alsmot all the accounts are showing the wrong number of MySQL databases used. Is there a script to run to correct this?
     
  2. 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:
    In addition to MySQL, does the system also have PostgreSQL installed?

    Are the database counts off by just one, where the total is 1 more than the expected count (e.g., 3 instead of 2, or 2 instead of 1, or 1 instead of 0)?

    I ask because it may be that PostgreSQL is installed but not fully configured yet, and so when the count is calculated there is an erroneous value returned for the number PostgreSQL databases (e.g., 1 instead of 0).
     
  3. nxweb

    nxweb Active Member

    Joined:
    Oct 29, 2008
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    It does have postgres installed too, but it is configured.
     
  4. 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 double-check to ensure the following two steps are completed for PostgreSQL:

    Step 1.)
    WHM: Main >> SQL Services >> Postgres Config >> Postgres Config Install
    On the above menu path, click to install the PostgreSQL configuration so it will be properly initialized.

    Step 2.)
    WHM: Main >> SQL Services >> Postgres Config >> Postgres Password
    On the above page, set the PostgreSQL (root) password.


    If you wanted to trigger a refresh of the database counts, you could remove the cached files that contain the counts, located in a path like the following two examples:
    Code:
    /home/username/.cpanel/datastore/mysql-db-count
    /home/username/.cpanel/datastore/postgres-db-count
     
  5. usercpanel

    usercpanel Member

    Joined:
    Aug 30, 2007
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Thanks

    Thank you Cpanel Don. It worked :)
     
Loading...

Share This Page