Home > OS >  does mysql.connector work with postgreeSQL?
does mysql.connector work with postgreeSQL?

Time:03-29

I am developing an app which uses MariaDB and mysql.connector for python. However, I reached to some point where I see that PostgreSQL could have benefits (e.g. it exists RETURNING). If I create again the database using Postgre, will I have to modify code related with mysql.connector in python? Or is the library totally compatible? If it's not, which library do I have to use?

CodePudding user response:

You need a new library. You need to install psycopg2 or psycopg-binary depending on your operating system.

This link is a detailed tutorial https://www.postgresqltutorial.com/postgresql-python/connect/

  • Related