Codeigniter, Nginx and Postgres for noobies like me.

MySql to Postgres conversion

April 09, 2009 in PostgreSQL by ElToro

If you are using postgres as your db system you have propably notices that lots of the web applications are lacking postgres support. Here are the best resources I have found to ease up your life if you want to hack some of some MySql based php application to work with Postgres.

MySql2pqsql is a small perl script to convert MySql sql schemas to Postgres compatible. It does not always work as 100% but it will give you a good start.

MySqlPHP2Postgres is a tool is Michael Kohns MySQL PHP to PostgreSQL conversion program. This is usefull to convert php files to talk Postgres instead of mysql. You can find binaries and sources from here.

Howto make MySQL database and PHP script work in PostgreSQL

Usually database based PHP scripts comes with some.sql file what will define what kind of database, tables and rows are needed. Unfortunately Postgres does not have internal conversion so usually DB-tables made for MySQL does not work. That does not mean that you can not get those PHP scripts working, you just need some changes and you are ready to go.

 

 

Leave a reply

Feel free to share your thoughts about this entry.

Nickname
Email
Website
Confirmation image
Confirmation code
Comment