Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    56
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,554
    Likes Received:
    9
    Trophy Points:
    168
    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).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. nxweb

    nxweb Active Member

    Joined:
    Oct 29, 2008
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    56
    It does have postgres installed too, but it is configured.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,554
    Likes Received:
    9
    Trophy Points:
    168
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. usercpanel

    usercpanel Member

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

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

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice