[off-topic] MYSQL Help!

Shaun McCarthy shaunm at web.co.nz
Wed Mar 5 17:50:35 CST 2003


I have had a similar problem once before. In my case it was because MySQL had a cached version of the schema which I had changed, and everything worked fine after I restarted the daemon. But I guess you have already done that?
 
MySQL can also throw weird errors if your SQL isn't correct. Have you done a "select from NeTraMet_Daily where date like '2001%'" to make sure the query is all good? Is "date" a date field? In which case you should really be using "where year(date)=2002"
 
Assuming it is a corrupt table, which it does sound like - do you have isamchk instead of myisamchk? (if you are using ISAM tables you should be using this anyway) but my memory of MySQL is fading (it might just be an internal command in older versions?) and my dev computer is on the other side of the world at the moment and I don't fancy trying to use it from an internet cafe :)
 
All else fails: RTFM:
http://www.mysql.com/doc/en/Repair.html
 
Or install a new version of mysql and make sure your fingers are crossed
 
Or leave
 
Shaun

	-----Original Message----- 
	From: Don Jones [mailto:don at gamma.net.nz] 
	Sent: Thu 6/03/2003 7:55 AM 
	To: wellington-pm-list at pm.org 
	Cc: 
	Subject: MYSQL Help!
	
	

	Hi
	
	This is a plea for help!
	
	This is a mysql question, with a perl script thrown in to keep it on topic, Im
	asking here as I may get an intelligent response
	
	I am not a DBA but unfortunately am the closest thing to one here, we have a
	mysql db which I look after, its version: 3.22.26a on FreeBSD 4.0-RELEASE (ie
	OLD). This db does a bunch of isp related stuff, ie dialup users info and ip
	billing.
	
	The problem is that there is a perl script which updates a particular table
	each night.
	
	I ran this command:
	
	mysql> delete from NeTraMet_Daily where date like '2001%';
	ERROR 1034: Incorrect key file for table: 'NeTraMet_Daily'. Try to repair it
	
	now when the script runs mysql will segfault
	
	I asked for help on #mysql on irc.freenode.net where they politely told me I
	should have upgraded 2 years ago, this is true but unfortunately doesnt help
	my imediate problem.
	
	I was also advised to use the tool myisamchk, unfortunately my version seems
	to old to include this tool.
	
	Any suggestions on how to "Try to repair it" would be welcome.
	
	Thanks
	
	Don Jones
	
	




More information about the Wellington-pm mailing list