Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect MySQL with Python 3.6 [closed]

I'm looking for a library to connect to MySQL with Python 3.6. All libraries I found did only work with older versions of Python. Sadly I can't change to an older Python version because i need some functions, which are introduced in Python 3.6.

I am programming on a raspberry pi3, but I don't think this should change anything.

Thanks for any help!

like image 928
no0by5 Avatar asked Feb 28 '17 18:02

no0by5


People also ask

How do I check if MySQL is closed in Python?

open attribute will tell you whether the connection has been explicitly closed or whether a remote close has been detected.

Does MySQLdb support Python 3?

MySQLdb module, a popular interface with MySQL is not compatible with Python 3.

How do I close MySQL connection in Python?

Practical Data Science using Python To disconnect Database connection, use close() method. If the connection to a database is closed by the user with the close() method, any outstanding transactions are rolled back by the DB.


1 Answers

mysqlclient supports python3.6 officially.

https://pypi.python.org/pypi/mysqlclient

like image 67
Beomi Avatar answered Oct 19 '22 10:10

Beomi