host = "127.0.0.1"
user = "root"
password = ""
db = "ceshi"
try:
conn = pymysql.connect(host=host, user=user, password=password, database=db, port=3306)
conn.close()
return '成功'
except Exception as err:
print(err)
return '失败'
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)