I am trying to upgrade new tutor 18.0.0. I was able to build all images without any issues. But the problem is the connecting mysql database. I really appriciate for any help.
ERROR 1524 (HY000): Plugin 'mysql_native_password' is not loaded
[10/10] Waiting for MySQL service (this may take a while)...
MySQL initialisation error
Error: Command failed with status 1: docker compose -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.yml -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.jobs.yml run --rm mysql-job sh -e -c echo "Initialising MySQL..."
mysql_connection_max_attempts=10
mysql_connection_attempt=0
until mysql -u root --password="xxx" --host "mysql" --port 3306 -e 'exit'
do
mysql_connection_attempt=$(expr $mysql_connection_attempt + 1)
echo " [$mysql_connection_attempt/$mysql_connection_max_attempts] Waiting for MySQL service (this may take a while)..."
if [ $mysql_connection_attempt -eq $mysql_connection_max_attempts ]
then
echo "MySQL initialisation error" 1>&2
exit 1
fi
sleep 10
done
echo "MySQL is up and running"
Hi. As mentioned in the PR, the mysql_native_password is deprecated and does not impact the version upgrade. Are you running MySQL externally? Or is it happening in the containerized environment?
pip install --upgrade "tutor[full]"
tutor local stop
sudo rsync -avr "$(tutor config printroot)"/ /tmp/tutor-backup/
tutor config save
tutor images build all # list the images that should be rebuilt here
tutor local upgrade --from=quince
tutor local launch
it seems like this is due to the change mysql image. It was running before [feat!: upgrade mysql to 8.4.0 (#1071) · overhangio/tutor@3d5e8fa · GitHub ]
Mysql 8.4.0 does not enable the mysql-native-password plugin by default anymore so it is likely this could be the reason.
The upgrade instructions you’ve followed seem to be fine. Can you mention what version of tutor you are upgrading from to 18.0.0 so that I can test it out myself. Can you also mention what plugins(if any) that you have enabled?
I happen to be trying to upgrade a system to Palm with that plugin enabled, and I started running into the same error.
Specifically, the plugin provided by tutor plugins install https://gist.githubusercontent.com/Abdess/3ed9ed1d42821d00a5cf2481870df26f/raw/tutor-mysql8utf8mb4.yml
is set to override to image: docker.io/mysql:latest.
I’m going to try and set it to image: docker.io/mysql:8.1.0 (the way it was before that PR) so I can work around this. I had already upgraded my server and it got 8.4.0 and then couldn’t downgrade back.
But if that doesn’t work with 8.1, and I really need 8.4 on Palm, then how can I adjust that plugin parameters to make it work? I tried adding --mysql-native-password=ON but then I started getting ERROR 2007 (HY000): Protocol mismatch; server version = 11, client version = 10 instead, which I couldn’t figure out a way around…
–mysql-native-password=ON is only needed if the underlying DB user plugins have this instead of caching_sha2_password? I am not currently sure under what circumstances a db plugin would have sha2 vs native. Regardless, we know native-password will be deprecated soon by MySQL.
This error mysql_native_password occurs because the plugin is disabled by default in MySQL 8.4+.
Follow two Methods described above to enable it. If the error persists
Ensure the plugin is loaded by checking:
SHOW PLUGINS;
Validate that the configuration file uses the correct syntax and section ([mysql] or [mysqld]).
In Tutor v19.0.2, a do command has been added that can help migrate auth plugin of existing users to caching_sha2_password from mysql_native_password. Please see: