Chapter 13 (Database web hosting) . Debugging and Repairing Databases 345
Chapter 13 . Debugging and Repairing Databases 345 At first, you might not think this method convenient or powerful enough for backing up tables (more than one table cannot be specified). However, by using the regular expression character for logical OR , you can back up more than one table name with mysqlhotcopy. In Figure 13-11, I re-run the command from Figure 13-10 and add the logical OR (or the pipe character) to the command because I want to back up the tables that contain the word card. Notice that the pipe character must be allowed to escape by using a backslash. Figure 13-11: Using the regular expression syntax for a logical OR you can back up more than one table with mysqlhotcopy. Up to this point I ve only been looking at the basic syntax of mysqlhotcopy. mysqlhotcopy includes a number of switches that directly affect the operation of the program. These switches can change which databases are copied, how they are copied, and any extra functions that mysqlhotcopyshould perform. When mysqlhotcopy makes a backup copy of a database the process fails if there is already a database of the same name. This has the obvious advantage of preventing an accidental overwrite of a vital database. Figure 13-12 shows an example of the error message when the destination database already exists. Note mysqlhotcopy indicates an error if the destination exists regardless of whether the destination is a database or a directory. Figure 13-12: If the destination exists, whether it is a database or directory, the mysqlhotcopy script fails and generates the error message shown.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.