Importing backup from Postgresql to Mysql Workbench

Asked

Viewed 76 times

-1

I backed up a database in Postgresql and now want to import it into Mysql Workbench on linux, as I do this (transfer . backup to . sql)?

  • How did you generate the backup in Postgresql? What is the complete specification of the used command?

  • It’s been a while since I did this, I currently use Mysql because I have more affinity with this DBMS

  • If you used pg_dump with Plain format or pg_dumpall then you will need to edit the generated text file to suit all commands to Mysql syntax. If you used another format I have no knowledge of any utility that does such conversion.

1 answer

1


You can use the pg_dump that comes with postresql, with the command below without specifying the name of the database a file will be created. sql in the directory you are with the sql that is in the file . bakcup

pg_restore -f database.sql database.backup 

Browser other questions tagged

You are not signed in. Login or sign up in order to post.