Professional Web Applications Themes

Conversion of a dump file - MySQL

I've inheritied a mysql dump from a 3.23 database. The appliance I'm supposed to reload it on is a 4.1 mysql database. it's bombing out on me, which really doesn't surprise me. However, I'm wondering if there is a script out there that will go through and check the syntax of the ..sql file and convert any 'non 4x' statements into something that 4.1 can understand and like. It's not a giant DB, it's about 250kb - but that's a lot of flat text to have to go bumbling though. thanks, -Keith...

  1. #1

    Default Conversion of a dump file

    I've inheritied a mysql dump from a 3.23 database. The appliance I'm
    supposed to reload it on is a 4.1 mysql database. it's bombing out on
    me, which really doesn't surprise me. However, I'm wondering if there
    is a script out there that will go through and check the syntax of the
    ..sql file and convert any 'non 4x' statements into something that 4.1
    can understand and like.

    It's not a giant DB, it's about 250kb - but that's a lot of flat text
    to have to go bumbling though.

    thanks,
    -Keith

    Keith Guest

  2. #2

    Default Re: Conversion of a dump file

    >I've inheritied a mysql dump from a 3.23 database. The appliance I'm 

    A dump from 3.23 should be largely compatible with 4.1, but one
    area where it may not be is in the use of field names or table names
    which have become keywords. What specific statement does it bomb
    out on? Find the statement (and which line of the statement, if it's
    on more than one line), and examine the field and table names.
     
    Gordon Guest

  3. #3

    Default Re: Conversion of a dump file

    "Keith" <com> wrote:
     

    AFAIK no such script exists yet. Maybe you want to write one? ;-)

    You can solve your problem by installing MySQL 3.23 on a spare machine
    and load the dump there. Then dump it again with the mysqldump program
    from 4.1. Newer mysqldump understands the --compatible option.

    i.e.

    hostA> mysql test <old_dump.sql
    hostB> mysqldump -h hostA test >new_dump.sql


    XL
    --
    Axel Schwenke, Senior Software Developer, MySQL AB

    Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/
    MySQL User Forums: http://forums.mysql.com/
    Axel Guest

  4. #4

    Default Re: Conversion of a dump file

    Keith wrote:
     

    Hmm, sounds like a perfect job for MySQL Query Browser. Load the script
    in the script editor and run it. The tool will stop at the position
    where the error occurs. You can set break points to have the script run
    holding while you examine your data in another tab (with a result set).

    Of course you can conveniently re-run your script or delete anything
    that ran successfully, instead of starting over all time.

    Mike
    --
    www.mysql.com
    Mike Guest

Similar Threads

  1. Flash9.ocx Crash info!! Dump File
    By Superman75 in forum Macromedia Flash Player
    Replies: 28
    Last Post: December 18th, 07:58 AM
  2. ERROR 1064 when trying to load dump from sql file
    By docw@globetrotter.net in forum MySQL
    Replies: 3
    Last Post: October 22nd, 09:56 PM
  3. Dump Excel File to Database table
    By Mark Martin in forum PERL Beginners
    Replies: 3
    Last Post: February 4th, 01:17 PM
  4. dump log/text continuously to file
    By Andreas O. Jaunsen in forum PERL Beginners
    Replies: 0
    Last Post: September 23rd, 07:29 PM
  5. How to locate memory dump file
    By Rebecca in forum SCO
    Replies: 7
    Last Post: July 23rd, 03:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139