Checking Whether Tables or Indexes Must Be Rebuilt
154
4. Stop the newer MySQL server and restart the older one.
5. Reload the dump file into the older server. Your tables should be accessible.
It might also be the case that system tables in the
mysql
database have changed and that
downgrading introduces some loss of functionality or requires some adjustments. Here are some
examples:
• Trigger creation requires the
TRIGGER
privilege as of MySQL 5.1. In MySQL 5.0, there is no
TRIGGER
privilege and
SUPER
is required instead. If you downgrade from MySQL 5.1 to 5.0, you will
need to give the
SUPER
privilege to those accounts that had the
TRIGGER
privilege in 5.1.
• Triggers were added in MySQL 5.0, so if you downgrade from 5.0 to 4.1, you cannot use triggers at
all.
• The
mysql.proc.comment
column definition changed between MySQL 5.1 and 5.5. After a
downgrade from 5.5 to 5.1, this table is seen as corrupt and in need of repair. To workaround this
problem, execute
mysql_upgrade
from the version of MySQL to which you downgraded.
2.19.2.1. Downgrading to MySQL 4.1
MySQL 4.1 does not support stored routines or triggers. If your databases contain stored routines
or triggers, prevent them from being dumped when you use
mysqldump
by using the
--skip-
routines
[304]
and
--skip-triggers
[305]
options. (See
Section 4.5.4, “
mysqldump
— A
Database Backup Program”
.)
MySQL 4.1 does not support views. If your databases contain views, remove them with
DROP VIEW
before using
mysqldump
. (See
Section 13.1.19, “
DROP VIEW
Syntax”
.)
After downgrading from MySQL 5.0, you may see the following information in the
mysql.err
file:
Incorrect information in file: './mysql/user.frm'
In this case, you can do the following:
1. Start MySQL 5.0.4 (or newer).
2. Run
mysql_fix_privilege_tables
, which will change the
mysql.user
table to a format that
both MySQL 4.1 and 5.0 can use.
3. Stop the MySQL server.
4. Start MySQL 4.1.
If the preceding procedure fails, you should be able to do the following instead:
1. Start MySQL 5.0.4 (or newer).
2. Run
mysqldump --opt --add-drop-table mysql > /tmp/mysql.dump
.
3. Stop the MySQL server.
4. Start MySQL 4.1 with the
--skip-grant-tables
[420]
option.
5. Run
mysql mysql < /tmp/mysql.dump
.
6. Run
mysqladmin flush-privileges
.
2.19.3. Checking Whether Tables or Indexes Must Be Rebuilt
A binary upgrade or downgrade is one that installs one version of MySQL “in place” over an existing
version, without dumping and reloading tables:
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...