|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
Read:
- PgAdmin Migration Wizard - Those specific articles 1 and 2 (php script) - PostgreSQL docs Please report on your choice and results!!!
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
|
#3
|
|||
|
|||
|
And see this post.
__________________
The real n-tier system: FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL Amazon wishlist -- rycamor (at) gmail.com |
|
#4
|
|||
|
|||
|
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?
|
|
#5
|
|||
|
|||
|
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)
|
|
#6
|
|||
|
|||
|
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. |
|
#7
|
|||
|
|||
|
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.
|
|
#8
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > mysql -> postgresql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|