Monday, November 26, 2018

python3 using mysql connection



$pip3 install mysql-connector-python --user

from mysql.connector import (connection)


cnx=connection.MySQLConnection(user='user', password='*******',
             host='ip', database='db')

cnx.close()


Resources:
[1] https://dev.mysql.com/doc/connector-python/en/connector-python-installation.html

No comments:

Social Indexes

  [1] Crime Index https://www.numbeo.com/crime/rankings.jsp  [2] Traffic Index https://www.numbeo.com/traffic/rankings_by_country.jsp