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!

How can I repair a crashed table?

Status
Not open for further replies.

southbeach

Programmer
Jan 22, 2008
879
US
Howdy!

Using Asterisk on Ubunto Linux and just ran into a problem. My HD ran out of space (found the trouble log file). I recovered my space but now, MySQL is freaking out.

I found that at least one table is marked as corrupted (asteriskcdrdb/cdr) and, of course, I need to repair it.

How can I repair this table?

Thank you all in advance!


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
ingresman,

Thanks for replying. I found a number of commands and compiled them ... here they are:

To connect to your MySQL Server:
# mysql -u root -p password

To display your databases:
mysql> show databases;

To display a list of tables:
mysql> show tables;

To repair a crashed table;
mysql> repair table [tablename];


Now, from the command prompt, if you wanted to check/repair all tables within a database:

# mysqlcheck -r -u username -p password databasename

or

# myisamchk -r -u root -p password databasename

Regards,


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Yes, I have.

I had to go back and key in some data that evidently was lost in the process. In this case, the data was related to voicemail configuration for my various defined extensions.

Thanks!


--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top