This commit is contained in:
2025-10-23 00:22:43 +08:00
parent 0881d3fbcb
commit d67ab615ce
34 changed files with 9442 additions and 1 deletions

23
create_db.py Normal file
View File

@ -0,0 +1,23 @@
import mysql.connector
try:
# Connect to MySQL server
conn = mysql.connector.connect(
host='127.0.0.1',
user='root',
password='123456',
port=3306
)
cursor = conn.cursor()
# Create database
cursor.execute("CREATE DATABASE IF NOT EXISTS qiandao CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci")
print("Database 'qiandao' created successfully!")
cursor.close()
conn.close()
except Exception as e:
print(f"Error: {e}")