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

Any problem with SQL can be discussed here.
Locked
pryj
Posts: 56
Joined: Tue Dec 21, 2004 1:06 pm

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

Post 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;


SHAdmin
Posts: 2089
Joined: Sat Dec 18, 2004 11:28 am
Contact:

Post by SHAdmin »

Great post pryj, well i am making this topic sticky, coz many people might need it.
sa3ude
Posts: 137
Joined: Wed Apr 13, 2005 4:32 am
Contact:

Post 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
Image
canotopia
Posts: 127
Joined: Sat Sep 10, 2005 8:15 pm

Post by canotopia »

url not found
Canotopia coming soon!
sa3ude
Posts: 137
Joined: Wed Apr 13, 2005 4:32 am
Contact:

Post by sa3ude »

Image
Locked