Archive for November, 2007

Chapter 13 . Debugging (Cool web site) and Repairing Databases 359

Friday, November 30th, 2007

Chapter 13 . Debugging and Repairing Databases 359 Figure 13-31: The SHOW TABLE STATUS statement shows that the table hasn t been checked recently. Figure 13-32: Performing a myisamchk with the -T switch that causes the Check_time to not be updated. Figure 13-33: Looking at the output from SHOW TABLE STATUS again, the value for Check_time has indeed remained the same even though I checked the table with myisamchk.
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

358 Part III . Administration The -c switch (Apache web server for windows)

Wednesday, November 28th, 2007

358 Part III . Administration The -c switch (which instructs the utility to check) is the default with myisamchk. The –extended-check, –fast, –check-only-changed, –force, and -medium- check options were discussed in the preceding section on mysqlcheck. The –informationswitch prints more information on the table(s) examined. Figure 13-30 shows an example of the myisamchkcommand run with the -i switch. Compare the results to Figure 13-29 to see the extra information printed. Figure 13-30: Using the -i or –information switch tells myisamchk to print more information about the table or tables that it examines. The -T or –read-only switch tells myisamchk not to update the Check_time table variable. (Information about tables can be obtained with the SHOW TABLE STATUS statement using the CLI.) Normally, when myisamchk operates on a table, it updates the Check_time variable. Examples of the -Tor –read-onlyswitch appear in Figures 13-31 through 13-33. Figure 13-31, the SHOW TABLE STATUS statement displays a table that hasn t been checked recently. Figure 13-32 shows a run of the myisamchkcommand with the -T switch. (Notice that the command operates the same as it would without the -T switch.) Figure 13-33 shows the SHOW TABLE STATUS command run again; notice that Check_time still hasn t changed.
We recommend high quality webhost to host and run your jsp application: christian web host services.

Chapter 13 . Debugging (Apache web server tutorial) and Repairing Databases 357

Tuesday, November 27th, 2007

Chapter 13 . Debugging and Repairing Databases 357 -? or –help -V or –version The basic syntax for myisamchkis as follows: myisamchk [OPTIONS]
[.MYI] (
[.MYI]) myisamchk has global options aside from those previously described. The -wait switch informs myisamchk to pause if the table is already locked. Using the -s switch causes myisamchkto be quieter as it goes about its business. Multiple -s switches can make the command even more silent. The -v switch causes myisamchk to print more information as it works. As with the -s switch, you can use more than one -v switch to increase the verbosity of myisamchk. myisamchk has two basic modes of operation: Check and Repair. The default action for myisamchkis to check the tables specified. Figure 13-29 shows a basic usage of myisamchk. Figure 13-29: An example of basic usage of myisamchk Options for checking tables with myisamchk The options relating to checking tables with myisamchk are as follows: -c or –check -e or –extended-check -F or –fast -C or –check-only-changed -f or –force -i or –information -m or –medium-check -U or –update-state -T or –read-only
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

My web server - 356 Part III . Administration If you want

Monday, November 26th, 2007

356 Part III . Administration If you want to only examine certain tables within a database, use the –tables switch. Because delete operations can cause fragmentation, you can speed up your examination by adding a –tables
clause so the mysqlcheckcommand examines only the specified table(s). To specify more than one table, separate the tablenames with whitespace. Figure 13-28 shows an example of mysqlcheck examining certain tables with the –tablesswitch. Note The –tables switch cannot be used with the –databases or -B switch. Figure 13-28: The –tables switch causes mysqlcheck to examine only the specified table or tables. To change the performance of mysqlcheck the -1 or –all-in-one switch can be used. This switch causes mysqlcheck to use a single query for all operations within a given database. This is as opposed to the normal behavior of one query per table. The -F or –force option causes mysqlcheck to continue its operation even if an error is encountered. Using this option can sometimes cause corruption or other problems. myisamchk The myisamchk utility serves to check and repair MyISAM tables while the MySQL server is offline. Much of the syntax and many of the switches for myisamchk are the same as those for mysqlcheck. The switches that mysqlcheck shares in common with other MySQL utilities include those for obtaining help and setting default character sets. As with the other utilities, I ll forego coverage of the following basic switches in this section: -# or –debug –character-sets-dir –default-character-set –compress -O or –set-variable
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

Chapter 13 . Debugging and Repairing Databases 355 (Web server extensions)

Sunday, November 25th, 2007

Chapter 13 . Debugging and Repairing Databases 355 Figure 13-26: Use the –auto-repair switch to automatically repair a table when a problem is found. Two functions defined with mysqlcheck examine all databases or more than one specified database. Command Function –all-databases Runs the specified operation on all databases within the MySQL server. -B or –databases Checks more than one, but not all, databases; used with the names of the databases separated by whitespace. Figure 13-27 shows an example of the –databases switch in use, examining three databases on the server. Figure 13-27: The –databases switch examines one or more databases with mysqlcheck.
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Web hosting control panel - 354 Part III . Administration The final main

Friday, November 23rd, 2007

354 Part III . Administration The final main function with mysqlcheck is to repair the table. This function is called with the -r or –repairoption. The repair function can fix most any problem with a table. However, the repair function can sometimes lose data; therefore I ll stress again to make sure you have backups. If mysqlcheck reports an error and you re going to repair it, it is always a good idea to check the integrity of your backups before proceeding. Figure 13-25 shows an example of mysqlcheck repairing a table. (Note that I purposely corrupted the table for this example.) Figure 13-25: Using mysqlcheck to repair a corrupt table When you use the main (default) option to check databases and tables with which mysqlcheck, you have several levels or degrees at which to examine the table(s) for errors: Command Function -c or –check The default option; checks all tables. -C or –check-only-changed Checks only tables that have changed since the last check. -F or –fast Looks for and examines tables that weren t closed properly. -q or –quick Does not check row-level objects. -m or –medium-check -e or –extended If you want for mysqlcheck to automatically repair any errors it finds, add the -auto- repair switch. Figure 13-26 shows an example of using the auto-repair switch with mysqlcheckto repair a broken table.
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Web hosting ecommerce - Chapter 13 . Debugging and Repairing Databases 353

Thursday, November 22nd, 2007

Chapter 13 . Debugging and Repairing Databases 353 The basic syntax for the mysqlcheckcommand is as follows: mysqlcheck [OPTIONS] database [tables] When called with no options, mysqlcheck examines the tables within the given database for errors. If no errors are found, a status message of OK is printed for each table, as shown in Figure 13-23. Figure 13-23: Mysqlcheck prints an OK status message for each table free from errors during the default check operation. Mysqlcheck also includes a function to analyze the key distribution for a table. This function is called with the -aor –analyze switch on the command line. The output when using this function is the same as with the default use of mysqlcheck when called with no options; the command outputs an OKstatus message. If the table does not need further analysis the status message is Table is already up to date. For example, if no changes have taken place, mysqlcheck recognizes this fact and does not perform additional analysis, as shown in Figure 13-24. Figure 13-24: Mysqlcheck -a outputs a different status message if the table does not need analysis. If you perform a large number of deletes or other changes to a table, you can improve performance by using the -o or –optimizeswitch with mysqlcheck. Optimizing the table will defragment the table. Like the process for analyzing a table, the optimization process will provide a status message for tables within the database.
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

Zeus web server - 352 Part III . Administration mysqlcheck mysqlcheck is

Wednesday, November 21st, 2007

352 Part III . Administration mysqlcheck mysqlcheck is a relatively new command for working with MyISAM tables. Caution Note The myisamchkprogram requires you to stop the server before running checks or repairs. However, the mysqlcheck command allows the server to be running while performing the checks and repairs. If a client is working with the table at the same time that mysqlcheck attempts the requested operation, the operation fails. The mysqlcheck command serves as the basis for most other troubleshooting functions with MySQL. Cross- Reference Like other commands with MySQL, mysqlcheck has many command-line switches and options the same. Refer to Chapter 8 on the MySQL CLI for full explanation of the common options, such as -# or –debug, –character-setsdir, –default-character-set, –compress, -?or –help, -hor –host, -p or –password, -P or –port, -S or –socket, -u or –user, and -V or -version. Tip As with many other commands with MySQL, you can obtain a syntax reference simply by typing the command, as shown in Figure 13-22. Figure 13-22: Typing mysqlcheck with no options yields a syntax and options reference for the command.
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Chapter 13 . Debugging and Repairing Databases 351 (Web host music)

Tuesday, November 20th, 2007

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.

350 Part III . Administration BACKUP TABLE Another (Cedant web hosting)

Monday, November 19th, 2007

350 Part III . Administration BACKUP TABLE Another method for backing up an individual table is via the BACKUP TABLEstatement. This statement runs from within (or using) the MySQL CLI. The syntax is as follows: BACKUP TABLE
(,
) TO The BACKUP TABLEstatement expects a path and directory as the argument for backup location. The statement currently only works with MyISAM tables as well. The BACKUP TABLEstatement makes a copy of the .frmand .MYDfiles for the given table. If you re backing up more than one table at a time, you should issue a LOCK TABLES statement before the BACKUP TABLEstatement to ensure consistency amongst the tables. Don t forget to issue a FLUSH TABLESstatement upon completion. Upon completion, the BACKUP TABLE statement prints a status message. If an error occurs, its message is also printed as part of the BACKUP TABLEoutput. For example, if the target directory does not exist, you receive a message similar to that in Figure 13-20. Figure 13-20: The BACKUP TABLE statement produces a status message upon completion, as well as an error message if needed. In Figure 13-21, a successful example of the BACKUP TABLEstatement is shown along with the resulting status message.
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.