I have downloaded the Connector/Python for MySQL successfully. I used the following code in Python\'s shell to test my connection:
import mysql.connector
just a note, I just installed mysql on an ubuntu 16.04 server. I tried different options in the following order:
sudo apt-get install python-mysqldb
: Was installed correctly, but unfortunatelly python returned ImportError: No module named 'mysql'
wget http://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python_2.1.4-1ubuntu16.04_all.deb
. Installed correctly with sudo dpckg -i package_name
, but python returned the same error. wget http://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-2.1.6.tar.gz
(used 2.1.4 at that time)tar -xf mysql-connector-python-2.1.6.tar.gz
cd mysql-connector-python-2.1.6/
sudo python3 setup.py install
Did not investigate why the first two failed, might try later. Hope this helps someone.