# -*- coding=utf-8 -*-
from mysql.connector import connect
config = {
'host': '192.168.199.139',
'port': 3306,
'user': 'root',
'password': '123456',
'database': 'jd',
'charset': 'utf8'
}
conn = connect(**config)
cs = conn.cursor()
rows_count = cs.execute('select * from goods;')
print(rows_count)
result = cs.fetchall()
print(result)
cs.close()
conn.close()