How to convert a MySQL database to a lower version?

Discussion in 'MySQL' started by Saf, Aug 19, 2006.

  1. #1
    Hi

    I have come across a problem regarding MySQL database versions. I have a MySQL version 4.1.15 database, but I am in the process of changing servers and the new server has MySQL 4.0.26 installed. Now when I try import my database it gives me loads of errors. Does anyone know an easy way to convert from version 4.1.15 to version 4.0.26?

    Any help would be awesome!
    Thanks
     
    Saf, Aug 19, 2006 IP
  2. shenron

    shenron Notable Member

    Messages:
    4,965
    Likes Received:
    374
    Best Answers:
    0
    Trophy Points:
    295
    #2
    What kind of export/backup are you trying to do?
    There are features that aren't available in 4.0.xx, but there shouldn't the a real problem, as most would imply with programming only, things like sub-selects, etc.
     
    shenron, Aug 19, 2006 IP
  3. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Why don't you ask the host to upgrade to mysql 4.1x? It's better anyways.
     
    mdvaldosta, Aug 19, 2006 IP
  4. iconv

    iconv Well-Known Member

    Messages:
    189
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Downgrading to MySQL 4.0
    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
     
    iconv, Aug 21, 2006 IP