def _int64_to_mysql(self, value):
    return int(value)
config = {'user': 'user', 'host': 'localhost', 'password': 'xxx',
    'database': 'db1'}
conn = mysql.connector.connect(**config)
conn.set_converter_class(NumpyMySQLConverter)
MySQL Connector/Python - insert python variable to MySQL table