Python/MySQL Connectivity
Install from RPM
Download the RPM from the Connector/Python Download page and, if necessary, upload to the target server
As 'root' in the directory whee you placed the RPM...
rpm -i mysql-connector-python-2.1.7-1.el7.x86_64.rpm
You may see this...
warning: mysql-connector-python-2.1.7-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
The warning appears to be ignorable.Check Installation
Try to import mysql.connector. If it is not installed you will see...
python
Python 2.7.5 (default, Aug 29 2016, 10:12:21)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mysql.connector
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mysql.connector
If it is installed, you will see...
python
Python 2.7.5 (default, Aug 29 2016, 10:12:21)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mysql.connector
>>>