Hi ,

i have use RedashV8 on premise install via docker on Ubuntu 18.04.4 and it works very good with mysqlv5
We have to upgrade mysql to V8 and we start to see issues with the connection
it return
“Connection Test Failed:
(2059, ‘Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory’”

i saw these two discuss

and i have add
MYSQL_DEFAULT_AUTH=mysql_native_password to env
but it is also do not solve the issue

do you have another suggestion at the client side and not change the password plugin at the mysql side ?

Did you update your mysqlclient to 1.4.6 or higher?

Yes at redash_server_1
should i do it at other services as well ?

does upgrading to Redash v10 can solve also the problem ?

You at least need to update the workers as well. The server never communicates with your database.

I’ve not seen any issue reports about the V10 beta.

i have upgrade mysqlclient to 1.4.6
at
redash_scheduled_worker_1
redash_scheduler_1
redash_adhoc_worker_1
redash_server_1

then docker-compose stop
docker-compose up -d

but it still return the same error

Sounds like an issue with your mysql instance then. Perhaps this SO question or a google search will help you.

some next steps

  1. i upgrade redash to 10.0.0-beta.b49597 and i get the same error with and without MYSQL_DEFAULT_AUTH=mysql_native_password
  2. i enter to docker redash_adhoc_worker_1 and notice this
    2.1) the python is python 3 unlike RedashV8
    2.2) the sql libs are
    root@9f4a96f318e5:/app# cat requirements_all_ds.txt | grep sql
    mysqlclient==1.3.14
    pymssql==2.1.4
    memsql==3.0.0

2.3) when i tried to update mysqlclient

pip install mysqlclient --upgrade
Collecting mysqlclient
Downloading mysqlclient-2.0.3.tar.gz (88 kB)
|████████████████████████████████| 88 kB 1.1 MB/s
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) … done
Created wheel for mysqlclient: filename=mysqlclient-2.0.3-cp37-cp37m-linux_x86_64.whl size=56883 sha256=87c3df73b361556b0bcb05e5c988a362b8b9f6f405166f3e1c3fa5c1f7851b70
Stored in directory: /tmp/pip-ephem-wheel-cache-yyt7dssj/wheels/79/1c/f8/11fafab45fe6696eea63794a5d747b9c6b54990ac6f1885fb7
Successfully built mysqlclient
Installing collected packages: mysqlclient
Attempting uninstall: mysqlclient
Found existing installation: mysqlclient 1.3.14
Uninstalling mysqlclient-1.3.14:
Successfully uninstalled mysqlclient-1.3.14
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

memsql 3.0.0 requires mysqlclient==1.3.13, but you’ll have mysqlclient 2.0.3 which is incompatible.
Successfully installed mysqlclient-2.0.3

2.4) now i get error that “connect() ‘charset’ is an invalid keyword argument” for any mysql server i try to connect also to mysqlv5

2.5) i downgrade again mysqlclient==1.3.14 and now i return to the first problem again with mysqlv8 (mysqlv5 works)

  1. i want a solution at the client side and not at the mysql server side with user that use old format of password

some updates

  1. i update again the mysqlclient-2.0.3 at the entire workers , stop the docker and up them again and mysqlv5 works ok but mysqlv8 still have the same error
  2. i tried to run python on the same VM with the following command
    2.1) import MySQLdb
    db=MySQLdb.connect(host = “host”, user = “user”,passwd=“pass”,db=“db”)
    and it success
    2.2) when i enter redash worker and run the same command at python cli it fail with the same issue , Plugin caching_sha2_password could not be loaded
  3. so it looks it related to the mysqlclient at python-alpine
    3.1) see this New MySQL 8 Default Authentication Plugin Not Supported · Issue #442 · PyMySQL/mysqlclient · GitHub

Good research! Did you try the suggestion from the issue you linked?

quoting:

This is now resolved.

After some time, I attempted to use the caching_sha2_password plugin again. I encountered the following error:

RSA Encryption not supported - caching_sha2_password plugin was built with GnuTLS support

Which prompted me to install gnutls-bin , which did the trick.

and the story continue :slight_smile:

i tried to work with the instruction and do
sudo apt-get update but it doesnt work with this error

"Ign:1 Index of /debian buster InRelease
Ign:2 Index of /debian buster-updates InRelease
Err:3 Index of /debian buster Release
404 Not Found [IP: 199.232.138.132 80]
Err:4 Index of /debian buster-updates Release
404 Not Found [IP: 199.232.138.132 80]
Ign:5 Index of /debian-security buster/updates InRelease
Err:6 Index of /debian-security buster/updates Release
404 Not Found [IP: 199.232.138.132 80]
Hit:7 Index of /debian/10/prod/ buster InRelease
Reading package lists… Done
E: The repository ‘Index of /debian buster Release’ no longer has a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository ‘Index of /debian buster-updates Release’ no longer has a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository ‘Index of /debian-security buster/updates Release’ no longer has a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details
"

the problem is that http is not valid any more and you need to change to https
so you need to edit /etc/apt/sources.list and change to http to https
(i didnt find how to edit it at the docker so i cp the file to my linux edit it there and recopy to docker
example docker cp ./source.list 3cd1f91a2184:/etc/apt/sources.list
)
then
sudo apt-get update
success !

next i try
sudo apt-get install libmysqlclient-dev
but it fail and suggest to use

“However the following packages replace it:
libmariadb-dev-compat libmariadb-dev”

so i use
sudo apt-get install libmariadb-dev

i update it on
redash_worker_1
redash_adhoc_worker_1
redash_scheduled_worker_1
redash_scheduler_1

and test connect to DB and query works !

however the story do not end here …
i try to connect to another DB also mysqlv8 and i now get new issue
“RSA Encryption not supported - caching_sha2_password plugin was built with GnuTLS support”
i tried to update now gnutls-bin
sudo apt install gnutls-bin

but it still have the problem