How to avoid table crash? Couple of days back I had a table with 7GB of data and it was showing 63MB of overhead in phpMyAdmin and I mistakenly started its optimization and after working of more than 40 mins it corrupted the whole table.

What are the safe practices to avoid table crash?
I would say to try to use a different storage engine like InnoDB.

It sounds like you were using MyISAM which isn't crash safe. If you want to continue using MyISAM and it crashes in the future, you can fix it with an external program called myisamchk.

http://dev.mysql.com/doc/refman/5.0/en/myisamchk.html

 myisamchk --force --key_buffer_size=512M --sort_buffer_size=64M --read_buffer_size=8M --write_buffer_size=8M  /path/to/datadir/*/*.MYI