MySQL Forums
Forum List  »  General

Re: Finding the cause of a crashed table
Posted by: Rick James
Date: January 13, 2015 05:32PM

* The key_buffer_size of 16M is not a problem.
* Do not change it to 1G unless you are using MyISAM heavily and have at least 5GB of RAM. For MyISAM usage, set key_buffer_size to 20% of available RAM.
* MyISAM tables are not limited to 4GB, and have not been for several major versions. He's running 5.5.8, which has a _default_ limit of 256TB, but could be raised further. See
http://mysql.rjweb.org/doc.php/limits
* The "key buffer" caches indexes for MyISAM tables only; it is irrelevant to InnoDB, other that taking up RAM.
* Today, InnoDB is preferred for virtually all environments.

> I'm using MySQL 5.5.8-log with Delphi XE and dbExpress.

Did you recently upgrade? And then the trouble started?

> How do I go about finding the cause of the table crash and how to I resolve it?
>150110 13:00:23 [ERROR] c:\xampp\mysql\bin\mysqld.exe: Incorrect key file for table '.\rdc_gl\trafficlog.MYI'; try to repair it
> 150110 13:01:45 [ERROR] c:\xampp\mysql\bin\mysqld.exe: Table '.\rdc_gl\trafficlog' is marked as crashed and should be repaired

The MyISAM table `trafficlog` in the database `rdc_gl` "crashed". Using the "mysql" commandline utility (or some UI), do
USE rdc_gl;
CHECK TABLE trafficlog;
# It will probably say there is a problem and suggest repairing. In which case do
REPAIR TABLE trafficlog;

A separate issue...
> 150110 13:01:38 InnoDB: Database was not shut down normally!
> InnoDB: Starting crash recovery.
Don't kill mysqld; it is better to shut it down gracefully. (Of course, if the server crashes, you have no choice.)

That leads to another issue... Whenever there is a 'crash', you are likely to need to 'repair' some MyISAM table(s). InnoDB does not need manual intervention, so I agree with Zero-G:
> What you also could try is to Change to InnoDB.

Options: ReplyQuote


Subject
Written By
Posted
Re: Finding the cause of a crashed table
January 13, 2015 05:32PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.