Jump to content

how to identify which db is being used?


jerseyjoe

Recommended Posts

I have a strange situation. My client, for reasons I don't know, went into cPanel and creted two additional MySql databases.

The store has been online for quite while so each is populated. In browsing each of them in PHPmyadmin I can't find any tables or cells with dates so there are no clues there as to which is being used most recently.

How can I determine which is the one that is currently functioning?

Link to comment
Share on other sites

Find the epoch time number for the current time (I think time(); will return that number). Then, you or your client should log in to the admin section. That will log an admin access in the database. Then examine the database, 'admin_sessions' table. If there are less than 250 entries, look for the last and compare the value in the time column. It should differ by only a few.

Link to comment
Share on other sites

Find the epoch time number for the current time (I think time(); will return that number). Then, you or your client should log in to the admin section. That will log an admin access in the database. Then examine the database, 'admin_sessions' table. If there are less than 250 entries, look for the last and compare the value in the time column. It should differ by only a few.
Thanks for the help.

Meanwhile I've found a simpler method - but still have a mystery.

The simpler method is to go into CC/ACP, create a new Administrator with an invented name. Then open PMA and see in which of the three DBs the new Admin appears. That will be the DB that the store is using.

But the mystery is the remaining unused DB.

In looking at PMA, I see

Account

database(27)

_database01(27)

Of course 27 is the number of tables.

I've already determined that _database01(27) is the active DB.

I want to delete database(27) but the active one _database01(27) is listed in PMA in way that implies that _database01(27) is a sub of the the first one. I am concerned that if I drop that one it will also drop _database01(27).

Comment?

Link to comment
Share on other sites

There could be a few ways of this:

1... The _ could be nothing more than a naming convention and therefore has no effect on the other db, so either can be deleted.

2... Backup the good db and import its contents into the old db then check that it works by altering global.inc.php. If all is well just delete the _ db.

3... Just backup the _ db delete the old one and if the good one is deleted just recreate and import the backup.

Hope this is off some help Joe

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...