mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
12 lines
452 B
Python
12 lines
452 B
Python
# coding=utf-8
|
|
import os
|
|
import time
|
|
import MySQLdb
|
|
|
|
conn = MySQLdb.connect(host="oj_mysql",
|
|
user=os.environ["MYSQL_ENV_MYSQL_USER"],
|
|
passwd=os.environ["MYSQL_ENV_MYSQL_ROOT_PASSWORD"])
|
|
conn.cursor().execute("create database if not exists oj default character set utf8;")
|
|
conn.cursor().execute("create database if not exists oj_submission default character set utf8;")
|
|
print "Create database successfully"
|