import mysql.connector
cnx = mysql.connector.connect(host='imaginarywebsite.ddns.net', database=
    'import_test', user='user_builder', password='password***', port=3309)
Remotely connect to MySQL with Python mysql.connector