September 11th, 2002, 01:40 PM
mysql -> postgresql
Does anyone know of an easy way to transfer data and structure from a mysql database to a potgresql database?
Both database are on two seperate server which I have somewhat limited access to.
September 11th, 2002, 01:54 PM
September 12th, 2002, 11:33 AM
September 16th, 2002, 12:20 PM
I downloaded the mysql2pgsql + but I don't know anything about perl, so I don't know how to use it. Do I upload it to the server and connect it to the database? or do I run it from my machine?
September 17th, 2002, 10:51 PM
mysql2pgsql is simply a command-line Perl script that processes a text dump file. It doesn't connect to the database itself. If you don't have command-line access to a Unix or Linux server (such as telnet, SSH), then you will have to install Perl on your Mac or PC in order to complete this. All it does is read in the MySQL dump file, and process it to turn it into a (hopefully) Postgres-compatible set of SQL commands to create a database. (read the usage instructions in the beginning of the script for the exact command-line syntax)
September 20th, 2002, 03:10 PM
Keep in mind there are alot of MySQL specific functions that may not be convertable with the mysql2pgsql script.
the mysql_data_seek (think that was how it's spelled) function is one such function that won't convert.
September 20th, 2002, 06:47 PM
Thanks I am just learning that now. I managed to get the database structure set up using pgadmin. But getting the data in there was a nightmare. However, I did get it in, and that was when I found out about the differences in syntax.
September 20th, 2002, 07:20 PM
I've found that trying to import a large amount of data through pgadmin didn't work out too well, because the ODBC receive buffer overloads and chokes at a certain point. For small loads it's a nice tool, but for big loads I find the Postgres COPY command has worked out the best. Though sorry that this information probably doesn't help you after the fact.