How to install mysql connector for python 3.5.1?

I am on python 3.5.1 and I am unable to install the mysql connector:

install --allow-external mysql-connector-python-rf mysql-connector-python-rf

not working, not a regular pip command for mysql-connector-python-rf. I get the following message:

error: option --single-version-externally-managed not recognized

Any ideas?

+4
source share
1 answer

Still not mysql-connectorfor python 3.5.1, but you can use pymysql to connect mysql to python 3.5.1!

import pymysql

conn = pymysql.connect(host='localhost', port=port_no, user='db_user', passwd='password', db='db_name')
+3
source

Source: https://habr.com/ru/post/1627102/


All Articles