Oracle 5.0 Reference Manual page 281

Table of Contents

Advertisement

mysql_upgrade
After running mysql_upgrade, stop the server and restart it so that any changes made to the system
tables take effect.
executes the following commands to check and repair tables and to upgrade the
mysql_upgrade
system tables:
mysqlcheck --all-databases --check-upgrade --auto-repair
mysql <
fix_priv_tables
Notes about the preceding commands:
• Because
mysql_upgrade
processes all tables in all databases, which might take a long time to complete. Each table is locked
and therefore unavailable to other sessions while it is being processed. Check and repair operations
can be time-consuming, particularly for large tables.
• For details about what checks the
the
option of the
FOR UPGRADE
Syntax").
fix_priv_tables
statements to upgrade the tables in the
All checked and repaired tables are marked with the current MySQL version number. This ensures that
next time you run
mysql_upgrade
need to check or repair the table again.
also saves the MySQL version number in a file named
mysql_upgrade
the data directory. This is used to quickly check whether all tables have been checked for this release
so that table-checking can be skipped. To ignore this file and perform the check regardless, use the
[261]
option.
force
If you install MySQL from RPM packages on Linux, you must install the server and client RPMs.
is included in the server RPM but requires the client RPM because the latter includes
mysql_upgrade
mysqlcheck. (See
Section 2.12, "Installing MySQL from RPM Packages on
In MySQL 5.0.19,
mysql_upgrade
of MySQL 5.0.25,
mysql_upgrade
does not upgrade the contents of the help tables. For upgrade instructions, see
mysql_upgrade
Section 5.1.8, "Server-Side
supports the following options, which can be specified on the command line or
mysql_upgrade
in the
[mysql_upgrade]
mysqlcheck. For example, it might be necessary to specify the
option.
mysql_upgrade
Section 4.2.3.4, "Command-Line Options that Affect Option-File
[261]
--help
Display a short help message and exit.
--basedir=path
The path to the MySQL installation directory. This option is accepted for backward compatibility but
ignored.
--datadir=path
The path to the data directory. This option is accepted for backward compatibility but ignored.
[261]
--force
— Check Tables for MySQL Upgrade
invokes
mysqlcheck
--check-upgrade
CHECK TABLE
represents a script generated internally by
mysql
with the same version of the server, it can tell whether there is any
was added as a shell script and worked only for Unix systems. As
is an executable binary and is available on all systems.
Help".
and
groups of an option file. Other options are passed to
[client]
also supports the options for processing option files described at
[261]
[261]
261
with the
--all-databases
[291]
option entails, see the description of
statement (see
Section 13.7.2.3,
mysql_upgrade
database.
--password[=password]
Handling".
[290]
option, it
"CHECK TABLE
that contains SQL
mysql_upgrade_info
Linux".)
[292]
in
--

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents