import pymysqldb = pymysql.connect(host='localhost', user='root', password='123456', port=3306, db='spiders')cursor = db.cursor()sql = 'select * from students;'cursor.execute(sql)cursor.close()db.close()