更新配置文件
This commit is contained in:
		@@ -1,9 +1,17 @@
 | 
			
		||||
import pymysql
 | 
			
		||||
from configs.config import MYSQL_HOST
 | 
			
		||||
from configs.config import MYSQL_HOST, MYSQL_PORT, MYSQL_NAME, MYSQL_USER, MYSQL_PASS
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# 连接 MySQL (开启 MySQL 服务)
 | 
			
		||||
conn = pymysql.connect(host=MYSQL_HOST, user="gameui", port=3306, password="gameui@2022", database='gameui', local_infile=True, cursorclass=pymysql.cursors.DictCursor)
 | 
			
		||||
conn = pymysql.connect(
 | 
			
		||||
    host=MYSQL_HOST,
 | 
			
		||||
    user=MYSQL_USER,
 | 
			
		||||
    port=MYSQL_HOST,
 | 
			
		||||
    password=MYSQL_PASS,
 | 
			
		||||
    database=MYSQL_NAME,
 | 
			
		||||
    local_infile=True,
 | 
			
		||||
    cursorclass=pymysql.cursors.DictCursor
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# 获取 MySQL 连接
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,8 @@
 | 
			
		||||
import oss2
 | 
			
		||||
from configs.config import OSS_HOST
 | 
			
		||||
 | 
			
		||||
from configs.config import OSS_HOST, OSS_ACCESS_KEY_ID, OSS_ACCESS_KEY_SECRET
 | 
			
		||||
 | 
			
		||||
# 连接 OSS
 | 
			
		||||
oss2.defaults.connection_pool_size = 100
 | 
			
		||||
auth = oss2.Auth('LTAI4GH3qP6VA3QpmTYCgXEW', 'r2wz4bJty8iYfGIcFmEqlY1yon2Ruy')
 | 
			
		||||
auth = oss2.Auth(OSS_ACCESS_KEY_ID, OSS_ACCESS_KEY_SECRET)
 | 
			
		||||
bucket_image2 = oss2.Bucket(auth, f'http://{OSS_HOST}', 'gameui-image2')
 | 
			
		||||
bucket_webp = oss2.Bucket(auth, f'http://{OSS_HOST}', 'gameui-webp')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user