diff --git a/auptest.py b/auptest.py index d697635..fe4fd88 100644 --- a/auptest.py +++ b/auptest.py @@ -36,14 +36,27 @@ CREATE TABLE pims_api_log ( import mysql.connector from datetime import datetime + +# host = 'rm-2zehj3r1n60ttz9x5.mysql.rds.aliyuncs.com' # 服务器访问使用 +# database = 'jingbo_test' # 服务器访问使用 +host = 'rm-2zehj3r1n60ttz9x5ko.mysql.rds.aliyuncs.com' # 北京访问使用 +database = 'jingbo_test' # 北京访问使用 + + + # 配置数据库连接信息,根据实际情况修改 config = { - "user": "your_username", - "password": "your_password", - "host": "your_host", - "database": "your_database" + "user": "jingbo", + "password": "shihua@123", + "host": host, + "database": "jingbo_test" } + + + + + def insert_api_log(request_time, request_ip, request_url, request_method, request_params, response_status_code, response_content, response_time): try: # 建立数据库连接