I've tried the tools listed here, some with more success than others, but none gave me valid postgres syntax I could use (tinyint errors etc.)
To connect MySQL to PostgreSQL through Foreign Data Wrapper, you must take note of the following as this is what will be required to create the connection: CREATE EXTENSION command to create a MySQL Foreign Data Wrapper extension to the PostgreSQL host. CREATE SERVER command to define a connection to the MySQL Server.
Both MySQL and PostgreSQL databases support stored procedures, but MySQL only supports standard SQL syntaxes, while PostgreSQL supports very advanced procedures. Stored Procedures are implemented in the form of functions in PostgreSQL with a RETURN VOID clause.
PostgreSQL supports more advanced queries, it performs better on complicated queries, but is harder to manage. MySQL is fast, easy to manage, but you can run into it's limitations on advanced queries, stored procedures and the like.
There's a mysqldump
option which makes it output PostgreSQL code:
mysqldump --compatible=postgresql ...
But that doesn't work too well.
Instead, please see the mysql-to-postgres tool as described in Linus Oleander's answer.
Try this one , it works like charm !!
http://www.sqlines.com/online
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With