Advertisement
Guest User

Untitled

a guest
Nov 6th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. import mysql.connector
  2. import time
  3. cnx = mysql.connector.connect(user='root', password='1234', host='46.105.30.230')
  4. cursor = cnx.cursor()
  5.  
  6. while True:
  7.     cursor.execute("show full processlist")
  8.     result=cursor.fetchall()
  9.     print(result)
  10.     time.sleep(1);
  11.  
  12. cursor.close()
  13. cnx.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement