Change mysql auth

This commit is contained in:
mxr612 2024-08-21 17:14:17 +08:00
parent e469b6fce0
commit a4b1c79cde
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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