删除旧文件

Signed-off-by: ray <tsbc@vip.qq.com>
This commit is contained in:
ray 2021-05-26 18:49:55 +08:00 committed by ray
parent f5ce0c100c
commit e2c9488c92
1 changed files with 0 additions and 9 deletions

View File

@ -1,9 +0,0 @@
import MySQLdb
conn = MySQLdb.Connect(host='localhost', port=int(3306), user='root', passwd='root')
db = 'automatic'
cur = conn.cursor()
if not cur.execute("SELECT * FROM information_schema.SCHEMATA where SCHEMA_NAME='" + db + "'"):
sql_create_db = "create database " + db + " DEFAULT CHARSET utf8 COLLATE utf8_general_ci"
cur.execute(sql_create_db)
cur.close()