FearTheHands Posted April 14, 2008 Posted April 14, 2008 Somehow a table in my DB has got corrupted. I get the following error message: --------------------------------------------------- 145 - Table './rcscart/whos_online' is marked as crashed and should be repaired delete from whos_online where time_last_click < '1208188731' [TEP STOP] --------------------------------------------------- When logging into the DB the table is flagged as an error Can I drop this table & recreate easily ? I have a backup of the DB but 2 weeks old & I don't want to lose the last 2 weeks data if possible Advice very much appreciated
FIMBLE Posted April 14, 2008 Posted April 14, 2008 You ought to be able to repair it from your web control panel. regards Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
FearTheHands Posted April 14, 2008 Author Posted April 14, 2008 You ought to be able to repair it from your web control panel.regards How do I go about that ? I have PHPMyadmin ... Thanks
MJP Posted April 14, 2008 Posted April 14, 2008 How do I go about that ? I have PHPMyadmin ... Thanks select the table, click the Operations tab and click Repair Table
FearTheHands Posted April 14, 2008 Author Posted April 14, 2008 select the table, click the Operations tab and click Repair Table Thanks for the reply The option 'repair table' is not avialable for this table, unlike the other tables. The table is being flagged as 'empty' & 'in use' if that makes any difference ? Attached a screenshot of PHPMyadmin: I also get another error: 'Error The additional features for working with linked tables have been deactivated. To find out why click here.' Clicking on the link revelas: Any ideas ? Thanks
MJP Posted April 14, 2008 Posted April 14, 2008 If it were me, I'd have a clean backup of the database, and then I'd drop the table and recreate it. And then I would switch web server hosts because it could happen again in no time.
FearTheHands Posted April 14, 2008 Author Posted April 14, 2008 If it were me, I'd have a clean backup of the database, and then I'd drop the table and recreate it. And then I would switch web server hosts because it could happen again in no time. I can easily restore an archive of the database, but I'm trying to avoid that as I would lose data If I drop the corrupt table - how can I ensure I recreate it correctly ?
MJP Posted April 14, 2008 Posted April 14, 2008 you don't have to restore the database just the whos online table. run this sql command: DROP TABLE IF EXISTS whos_online; CREATE TABLE whos_online ( customer_id int, full_name varchar(64) NOT NULL, session_id varchar(128) NOT NULL, ip_address varchar(15) NOT NULL, time_entry varchar(14) NOT NULL, time_last_click varchar(14) NOT NULL, last_page_url varchar(64) NOT NULL );
FearTheHands Posted April 14, 2008 Author Posted April 14, 2008 you don't have to restore the database just the whos online table. run this sql command: DROP TABLE IF EXISTS whos_online; CREATE TABLE whos_online ( customer_id int, full_name varchar(64) NOT NULL, session_id varchar(128) NOT NULL, ip_address varchar(15) NOT NULL, time_entry varchar(14) NOT NULL, time_last_click varchar(14) NOT NULL, last_page_url varchar(64) NOT NULL ); Thanks! That appears to have worked a treat :thumbsup: I've taken a screenshot of how that table now looks - does everything look OK? Should I be worried about the "No index defined!" error ? Thanks ...
MJP Posted April 14, 2008 Posted April 14, 2008 Thanks! That appears to have worked a treat :thumbsup: I've taken a screenshot of how that table now looks - does everything look OK? Should I be worried about the "No index defined!" error ? Thanks ... oscommerce doesn't see a need to define an index for this table so don't worry about it.
FearTheHands Posted April 14, 2008 Author Posted April 14, 2008 oscommerce doesn't see a need to define an index for this table so don't worry about it. Thanks again for all your help - I really was stumped so you've solved a big problem for me :rolleyes:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.