db_conn.py 149 B

1234567
  1. #!/usr/bin/python
  2. # -*- coding: UTF-8 -*-
  3. import MySQLdb
  4. # 打开数据库连接
  5. db = MySQLdb.connect("xxx","xxx","xxx","db_backup",charset='utf8')