输出连接数据库信息

This commit is contained in:
ray 2020-06-11 20:56:49 +08:00 committed by ray
parent 1ff916e411
commit e91449322b
1 changed files with 1 additions and 0 deletions

View File

@ -184,6 +184,7 @@ class Controller(object):
def set_conn(cls):
cls.conn = MySQLdb.connect(host=DB_HOST, port=DB_PORT, user=DB_USER, passwd=DB_PASS, db=DB_NAME,
charset='utf8')
print("Mysql Connet Info", "host:", DB_HOST, "port:", DB_PORT)
cls.cur = cls.conn.cursor()
@classmethod