From a4b1c79cde381fc4a3625b9aac37460ddfbabc06 Mon Sep 17 00:00:00 2001 From: mxr612 Date: Wed, 21 Aug 2024 17:14:17 +0800 Subject: [PATCH] Change mysql auth --- main.py | 1 - mysql_connector.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index a5a02f6..be00639 100644 --- a/main.py +++ b/main.py @@ -32,7 +32,6 @@ def query(query:str): async def get_reference(questions): res = query(questions) new = [] - print(res) for i in res: if not mysql_connector.is_loaded(i['id']): new.append(i) diff --git a/mysql_connector.py b/mysql_connector.py index b1c999b..0980995 100644 --- a/mysql_connector.py +++ b/mysql_connector.py @@ -9,7 +9,8 @@ mysql_config = { 'password': __CONFIG__['mysql_password'], 'host': __CONFIG__['mysql_host'], # Typically 'localhost' if the database is on the same machine 'database': 'fastdoi', - 'raise_on_warnings': True + 'raise_on_warnings': True, + 'auth_plugin':'mysql_native_password' } # Establish a connection to the MySQL database