The table format in 4.1 changed to include more and new character set information. Because of this, you must use mysqldump to dump any tables you have created with the newer MySQL server. For example, if all the tables in a particular database need to be dumped to be reverted back to MySQL 4.0 format, use this command:
shell> mysqldump --create-options --compatible=mysql40 db_name
> dump_file
Then stop the newer server, restart the older server, and read in the dump file:
shell> mysql db_name
< dump_file
In the special case that you are downgrading
MyISAM
tables, no special treatment is
necessary if all columns in the tables contain only numeric
columns or string columns (CHAR
,
VARCHAR
,
TEXT
, and so forth) that contain
only latin1
data. Your 4.1 tables should be
directly usable with a 4.0 server.
If you used the mysql_fix_privilege_tables script to upgrade the grant tables, you can either use the preceding method to convert them to back to MySQL 4.0 or do the following in MySQL 4.1 (or above):
ALTER TABLE mysql.user CONVERT TO CHARACTER SET latin1 COLLATE latin1_swedish_ci; ALTER TABLE mysql.db CONVERT TO CHARACTER SET latin1 COLLATE latin1_swedish_ci; ALTER TABLE mysql.host CONVERT TO CHARACTER SET latin1 COLLATE latin1_swedish_ci; ALTER TABLE mysql.tables_priv CONVERT TO CHARACTER SET latin1 COLLATE latin1_swedish_ci; ALTER TABLE mysql.columns_priv CONVERT TO CHARACTER SET latin1 COLLATE latin1_swedish_ci; ALTER TABLE mysql.func CONVERT TO CHARACTER SET latin1 COLLATE latin1_swedish_ci;
User Comments
Add your own comment.