views:

27

answers:

2

I have done the depot application using mysql... Now i am in need to use postgres... So i need to dump data from mysql database "depot_development" to postgres database "depot_develop"...

A: 

Here you can find some interesting links http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#MySQL

Simon
i did try that but the syntax where not matching with psql... so had many errors.. it didnt work wel... thanks..
zealmurugan
What errors did you exactly get?
Simon
A: 

Have you tried to copy the tables from one database to the other:

a) export the data from MySQL as a CSV file like:

$> mysql -e "SELECT * FROM table" -h HOST -u USER -p PWD -D DB > /file/path.csv'

and then,

b) import it into Postgres like:

COPY table FROM '/file/path.csv' WITH CSV;
Kosmas
I had the problem of logging in without data in the users table... so i had no choice to insert data copying from the already existing table... so manually inserted data in psql... so the it was ok to work.. thank you..
zealmurugan