1、配置数据库的基本信息
db_config={‘host’:‘XXX’,
‘user’:‘XXXX’,
‘password’:‘XXX’,
‘port’:‘XXX’,
‘database’:‘XXX’
}
2、创建连接
conn=MYSQLdb.connect(**db_config)
3、获取光标
cursor = cnn.cursor()
4、SQL语句-字符串格式
query_sql = ‘select max(mobilePhone) from member where MoblieP