Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'xx.xxx.xx.xxx:3306' (10061 No connection could be made because the target machine actively refused it)
- import mysql.connector
- db = mysql.connector.connect(host='xx.xxx.xx.xxx', database='bm_new', user='dbusername', password='dbpassword')
- if db.is_connected():
- print('connected to Mysql database')
Add Comment
Please, Sign In to add comment