Forums / General Questions / Database error - site crashed!!! db_cache is marked as crashed and should be repair

Database error - site crashed!!! db_cache is marked as crashed and should be repair

Locked

Views: 6,685

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
21 Aug 2007, 5:50 AM
#1
scully2569 avatar

scully2569

New Zenner

Join Date:
Jan 2006
Posts:
13
Plugin Contributions:
0

Database error - site crashed!!! db_cache is marked as crashed and should be repair

I need help... This is the error I am getting

1194 Table 'zen_db_cache' is marked as crashed and should be repaired

Does anyone know what this means and how to fix it.

Thanks

21 Aug 2007, 6:37 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Database error - site crashed!!! db_cache is marked as crashed and should be repair

If you are with a host that provides you with cPanel - there is a repair Db function that you could try. I would back it up first.

As this is just a cache and only contains temp data you can uisng phpmyadmin select this table only and in a pulldown at the bottom you can select "empty" and go. This will clear the temp data data out if that is the issue

Zen-Venom Get Bitten

9 Oct 2008, 2:26 AM
#3
zenartman avatar

zenartman

Zen Follower

Join Date:
Nov 2005
Posts:
134
Plugin Contributions:
0

Re: Database error - site crashed!!! db_cache is marked as crashed and should be repair

Tested both but fails. Db repair and phpmyadmin where the zen_db_cache is emptied but seems like nothing changes.

9 Oct 2008, 10:44 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Database error - site crashed!!! db_cache is marked as crashed and should be repair

What is your most recent DB Backup date prior to this error?

For a busy shop, you should take one daily

Zen-Venom Get Bitten

14 Oct 2008, 4:34 AM
#5
zenartman avatar

zenartman

Zen Follower

Join Date:
Nov 2005
Posts:
134
Plugin Contributions:
0

Re: Database error - site crashed!!! db_cache is marked as crashed and should be repair

There are several backups. For example one dates to April, 2006. While this time zen_db_cache is crashed and is void of content, the earlier backups show certain content like this:

-- Table structure for table zen_db_cache

DROP TABLE IF EXISTS zen_db_cache;
CREATE TABLE zen_db_cache (
cache_entry_name varchar(64) NOT NULL default '',
cache_data blob,
cache_entry_created int(15) default NULL,
PRIMARY KEY (cache_entry_name)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table zen_db_cache

/*!40000 ALTER TABLE zen_db_cache DISABLE KEYS */;
LOCK TABLES zen_db_cache WRITE;
INSERT INTO zen_db_cache VALUES ('.................................. so on

so on
so on, and after many lines ending like this:

UNLOCK TABLES;
/*!40000 ALTER TABLE zen_db_cache ENABLE KEYS */;

SHOULD THESE BE COPIED TO THE CRASHED DATABASE?

14 Oct 2008, 4:47 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Database error - site crashed!!! db_cache is marked as crashed and should be repair

You do not need to include the "Dumping data .... " section for the db_cache table.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Oct 2008, 2:14 AM
#7
zenartman avatar

zenartman

Zen Follower

Join Date:
Nov 2005
Posts:
134
Plugin Contributions:
0

Re: Database error - site crashed!!! db_cache is marked as crashed and should be repair

Thank you very much DrByte,

How the database is copied?

  1. Thru phpmyadmin?
  2. Or the online shop backend should be be used to upload this part:
    DROP TABLE IF EXISTS zen_db_cache;
    CREATE TABLE zen_db_cache (
    cache_entry_name varchar(64) NOT NULL default '',
    cache_data blob,
    cache_entry_created int(15) default NULL,
    PRIMARY KEY (cache_entry_name)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

BTW the backend login is crashed too when the above mistake happens.
Googling on copying database brought some results written in quite technical jargon.

15 Oct 2008, 2:38 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Database error - site crashed!!! db_cache is marked as crashed and should be repair

The best and fastest thing to do when you get that problem is to go into phpMyAdmin and click on the SQL tab and enter the following statement, and click Go:```
repair table zen_db_cache;

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Oct 2008, 3:03 AM
#9
zenartman avatar

zenartman

Zen Follower

Join Date:
Nov 2005
Posts:
134
Plugin Contributions:
0

Re: Database error - site crashed!!! db_cache is marked as crashed and should be repair

Doing that shows this:

import.php: Missing parameter: import_type (FAQ 2.8)
import.php: Missing parameter: format (FAQ 2.8)

Checking again zen_db_cache shows:
Error

SQL query: Edit

SHOW INDEX FROM zen_db_cache ;

MySQL said: Documentation
#145 - Table './mydomain_zc1/zen_db_cache' is marked as crashed and should be repaired

15 Oct 2008, 3:40 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Database error - site crashed!!! db_cache is marked as crashed and should be repair

Then your phpMyAdmin has some problems with it.
You could try doing the repair via your ZC Admin sql patch tool: ```
repair table db_cache;


If that doesn't work, or you can't access it, you'll have to drop the table and recreate it, using what you posted in your 2nd point in your previous post.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

5 Jan 2009, 4:47 PM
#11
batteryman avatar

batteryman

Zen Follower

Join Date:
Jul 2004
Location:
Las Vegas
Posts:
327
Plugin Contributions:
0

Re: Database error - site crashed!!! db_cache is marked as crashed and should be repair

What causes the zen_db_cache file to get messed up? I just had the same problem, and the zen_db_cache had "in use" across the table. At first I tried restarting mysql service and then I tried restarting Apache thinking that something was tiing up my server and by restarting would break it connection, didnt work. So it must have been internal. So then I went to my database and tried backing up but it couldnt do it. Just got the header info.

After that I just went to the zen_db_cache and emptied it. Fixed it right away. Just don't know what caused it to go weird.

Can you explain?

User of zencart

19 Sep 2009, 5:56 PM
#12
makenoiz avatar

makenoiz

Zen Follower

Join Date:
Mar 2006
Posts:
284
Plugin Contributions:
0

Re: Database error - site crashed!!! db_cache is marked as crashed and should be repair

Running repair table db_cache; at SQL command worked for me~!!!

Thanks!

22 stores and counting! Ive been zenned.