mysql2psql

Version 0.0.1a

This program is a filter that converts a "mysqldump" file to a "pg_dump" file so that it can be reloaded by "psql".

This is the first version of mysql2psql script. It was used to convert the data descriptions for one five table database that I was working on at the time.

I didn't use the script to INSERT the data so I dumped the mysql data with the -d option.  I used the INSERT successfully on a previous project but havent tested with this script.

I use this script under RedHat 7.0.

This would be the normal usage of the srcipt assuming that you have created the user and database but not loaded any tables.


mysqldump -d -u myuser db_name > DB_NAME.MYSQL
mysql2psql DB_NAME.MYSQL > DB_NAME.PSQL
psql -u myuser db_name < DB_NAME.PSQL

This is a start I converted a few of these by hand when I decided that a script would be better than my memory for keeping track of what the rules were.

Bill Roberts





