Chapter 13 . Debugging and Repairing Databases 351 (Web host music)
Chapter 13 . Debugging and Repairing Databases 351 Figure 13-21: A successful run of the BACKUP TABLE statement Troubleshooting and Repairing Table Problems I once had a client who, instead of logging in to a machine and typing reboot, would simply turn the machine off and then back on. He couldn t figure out why the files on the system were corrupt and some tables in the database would often give errors and need repair. He blamed the corruption and errors on just about everything else, and didn t even think that turning the machine off without shutting down the applications could affect the integrity of anything on the computer. MySQL is a stable and robust database server, but even MySQL would have a hard time maintaining data integrity in such a situation. Although I can t say that table corruption never results from an error in the database itself, normally the server maintains the integrity of its data at all times. Instances of table errors and corruption usually point to a dirty shutdown of MySQL or the server, a hardware failure, or some other catastrophe not directly related to the MySQL server. When a failure does occur, make sure you have backups of both the data and the table structure that keeps your data organized. Having current and quality backups is the first line of defense in administration of the MySQL server. Aside from catastrophe, tables can sometimes suffer from fragmentation. This can occur because of deletes and updates to a table. Knowing how to optimize tables is another aspect of administration of a MySQL server. This section examines the commands and statements you use for troubleshooting and repairing tables in MySQL. Most of the section concentrates on the MyISAM table type (the default in MySQL), although some tools can be used with the BerkeleyDB (BDB) transactional table type.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.