Page 1 of 1

[Guide] Downgrading MySQL 4.1.x to 4.0.x

Posted: Fri Aug 26, 2005 7:15 am
by pryj
This is straight from MySQL.com **** at http://mysql.ausgamers.com/doc/mysql...ng-to-4-0.html

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're 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;

Posted: Wed Sep 07, 2005 5:56 am
by SHAdmin
Great post pryj, well i am making this topic sticky, coz many people might need it.

Posted: Thu Sep 08, 2005 8:29 pm
by sa3ude
thanks pryj for the verey good ****
i'm going now to look for a way to back my old data on mysql.com
i was have a big forum 1 years ago and i have the back up but i cant back it cauz of the mysql
thanks again
bye now

Posted: Sat Sep 10, 2005 9:03 pm
by canotopia
url not found

Posted: Sun Sep 11, 2005 2:48 am
by sa3ude