Guest User

Untitled

a guest
Nov 5th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. 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)
  2.  
  3. import mysql.connector
  4.  
  5. db = mysql.connector.connect(host='xx.xxx.xx.xxx', database='bm_new', user='dbusername', password='dbpassword')
  6. if db.is_connected():
  7. print('connected to Mysql database')
Add Comment
Please, Sign In to add comment