This is a discussion on Conversion of a dump file within the MySQL Database forums, part of the Database Forums category; I've inheritied a mysql dump from a 3.23 database. The appliance I'm supposed to reload it on ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
>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 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. >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. |
|
|||
|
"Keith" <keith.phipps@gmail.com> wrote:
> 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. 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/ |
|
|||
|
Keith wrote:
> 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. 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 |