MySQL logs "Please use caching_sha2_password instead" after upgrade to MySQL 8.0/Xibo 4

When you upgrade a self-hosted installation from MySQL 5.7 to MySQL 8.0 as part of the upgrade to Xibo version 4, you may find the following logged in your MySQL logs repeatedly.

[Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ‘‘mysql_native_password’ is deprecated and will be removed in a future release. Please use caching_sha2_password instead’

The following will update the user record for your cms database user to use the newer password format and clear the warning.

docker-compose stop
docker run --rm -ti -v /opt/xibo/shared/db:/var/lib/mysql mysql:8.0 bash
cd /tmp
echo "ALTER USER cms IDENTIFIED WITH caching_sha2_password BY 'password';" > init.txt
mysqld --init-file=/tmp/init.txt &

If you use cms_custom-ports.yml or cms_remote-mysql.yml then be sure to add the -f parameter to the docker-compose commands as you would normally. Substitute /opt/xibo/shared/db for the correct path to the shared/db directory for your installation. Substitute password with the password for your cms user as shown in config.env.

Wait for the MySQL server to start fully and report that it’s ready to start acceping connections, then hit the Enter key and type


Then bring the containers back up

docker-compose up -d

The warning should be gone from the logs.

1 Like