Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Repairing Tables

Status
Not open for further replies.

thegentleman

IS-IT--Management
Apr 4, 2001
65
GB
Having never needed to do it before I know nothing about repairing tables. I tried to run a simple delete query and got:

ERROR 1034: Incorrect key file for table: 'table'. Try to repair it

So I tried to run myisamchk by typing at the command line:

myisamchk --recover --quick table

And got the following:

1064: You have an error in your SQL syntax near 'myisamchk --recover --quick table' at line 1

What am I doing wrong?

Thanks in advance.

~tg
 
try
repair table [tablename]; on ur mysql prompt

--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
Thanks spookie,

I typed:

repair table [w3t_Users];

At the MySQL command prompt and got:

ERROR 1064: You have an error in your SQL syntax near 'repair table [w3t_Users]'
at line 1

In reply...
 
Yeah, I did that too: 'repair table w3t_Users'

Still got:

ERROR 1064: You have an error in your SQL syntax near 'repair table [w3t_Users]'
at line 1

!

 
Do I need to install something into MySQL to run these commands?

I've tried:

myisamchk --recover --quick MyTable;
isamchk --recover --quick MyTable;
repair table MyTable;

On the MySQL command line in telnet.

Each command gives me:

ERROR 1064: You have an error in your SQL syntax near 'n'
at line 1

Any help will be appreciated.

~tg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top