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
/usr/lib/python3/dist-packages/_mysql_connector.cpython-35m-i386-linux-gnu.so
The archive manager shows that this file is contained in
mysql-connector-python-cext-py3_2.1.7-1ubuntu16.04_i386.deb
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 "testsql.py", 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
/usr/lib/python3/dist-packages/_mysql_connector.cpython-35m-i386-linux-gnu.so
The archive manager shows that this file is contained in
mysql-connector-python-cext-py3_2.1.7-1ubuntu16.04_i386.deb
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 "testsql.py", 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