Thread: Error in restore the Database in Postgres

Error in restore the Database in Postgres

From
dipesh
Date:
Dear Sir,
I have Mysql database backup file ( xyz.sql ). Now i want to restore 
this ( xyz.sql ) file into Postgres Database.
I try following command to restore but Postgres gives me the Error.

psql -d tracker -f /home/postgres/backup/tracker_db.sql

In xyz.sql file Lock Table; statement is written on each table.

I use Postgres 8.1 version.
Kindly Help me as early as possible. Or, give me another command.

-- 
With Warm Regards,
Dipesh Mistry
Information Technology Dept.
GaneshaSpeaks.com



Re: Error in restore the Database in Postgres

From
Richard Huxton
Date:
dipesh wrote:
> Dear Sir,
> I have Mysql database backup file ( xyz.sql ). Now i want to restore 
> this ( xyz.sql ) file into Postgres Database.
> I try following command to restore but Postgres gives me the Error.

You have a mysql dump, which is designed to restore to a MySQL database. 
It will include mostly standard SQL and also all the specific MySQL 
differences.

You'll need to convert it to produce something that PostgreSQL can 
understand.

http://pgfoundry.org/search/?type_of_search=soft&words=mysql&Search=Search

Perhaps one of these two projects:
http://pgfoundry.org/projects/mysql2pgsql/
http://pgfoundry.org/projects/my2postgres/

--   Richard Huxton  Archonet Ltd