MySQL Forums
Forum List  »  Connector/Python

Posted by: Per Anton Ronning
Date: February 04, 2018 06:44AM

Does python connection to MySQL work at all? I have now undertaken an extensive study of the topic, and the closest I get is this file

The archive manager shows that this file is contained in

which is a file obtained from the connector/python download page

I saved it in /tmp and ran dpkg -i mysql-connector-python-cext-py3_2.1.7-1ubuntu16.04_i386.deb

The code example in the documentation chapter 5.1
#!/usr/lib/python/dist-packages (added by me)
import mysql.connector

results in:

File "", line 9, in <module>
import mysql.connector
ModuleNotFoundError: No module named 'mysql'

I have bees searching a lot to find the mysql module, but it seems not to be present. At least not using the linux find command.
It seems to me that something must be very wrong here.
I am running; python3.6, Linux Mint 18.3 (based on Ubuntu 16.04) and
MySQL 5.7.21-0

Options: ReplyQuote

Written By
February 04, 2018 06:44AM
April 09, 2018 06:39AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.