St.connection: 'caching_sha2_password' cannot be loaded

Hi,
I am trying to connect to sql database using st.connection.

reports.py

import streamlit as st

conn = st.connection("reports_db", type = "sql")

but getting

(MySQLdb._exceptions.OperationalError) (2059, "Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/anaconda3/envs/llm/lib/plugin/caching_sha2_password.so, 0x0002): tried: '/usr/local/anaconda3/envs/llm/lib/plugin/caching_sha2_password.so' (no such file)

Based on the above post, It seems that newer version of mysql server doesn’t have old plugin [ mysql_native_password]. I
Hence, the ALTER User command is not working as I am using mysql 9.1.0 and the native plugin has been removed from 9.0.0.
Is there anyway in which we can make the connection work with new plugin.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.