We recommend that you check the database tables before upgrading. Checking the database tables corrects some problems and helps to avoid failures and recovery assistance with CA Support. This topic describes how to run the mysqlcheck command before the upgrade to verify that the database tables are set up properly.
You can run the mysqlcheck command to check the following databases:
Checking large database tables can be time-consuming. If you run the check on an entire database, each table in the database is locked in read-only state sequentially. The table that is being checked is unavailable for write operations.
You can run mysqlcheck without stopping MySQL: The MySQL deamon process (mysqld) can continue to run on Linux servers and the MySQL service can continue to run on Windows servers.
Follow these steps:
mysqlcheck --all-databases
mysqlcheck --databases db_name
Example:
mysqlcheck --databases reporter
where:
db_name = Name of the database that you want to check
You do not need to specify the path to the database. The mysqlcheck command will find any or all databases that use the default port (port 3308). The custom storage engine does not support the use of the mysqlcheck command for its archive and archive15 databases. The command fails to run even if you specify the correct port (port 3307) for the connection to these databases.
The command checks each table, attempts to repair any problems, then analyzes and optimizes the table. The return text lists the database tables that were checked and reports the status for each table.
If the table passed the check, "OK" follows the table name. If a warning is returned and is followed by "OK," the problem was resolved. If unresolved errors occur, contact CA Support.
Next: Stop the services, then back up the databases, as described in the following topics.
Copyright © 2013 CA.
All rights reserved.
|
|