ERROR 1524 (HY000): Plugin 'mysql_native_password' is not loaded

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/ --project-name tutor_local -f /home/ubuntu/.local/share/tutor/env/local/ run --rm mysql-job sh -e -c echo "Initialising MySQL..."
until mysql -u root --password="xxx" --host "mysql" --port 3306 -e 'exit'
    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 ]
      echo "MySQL initialisation error" 1>&2
      exit 1
    sleep 10
echo "MySQL is up and running"

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

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?

@Syed_Muhammad_Dawoud I am running MYSQL along with tutor.

Right. Can you share the steps you took to upgrade/install v18?

I upgarded with an instruction as mention:

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

Hi. I’m sorry to hear you’re facing this issue.

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?

@Danyal_Faheem Thanks for quick response. I am upgrading from tutor v16.1.0

@Syed_Muhammad_Dawoud Note: this is going to break people who are running with the MySQL fix to get around the Open edX regression where it broke emoji support: Upgrading MySQL charset to utf8mb4 - #4 by dave

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
is set to override to image:

I’m going to try and set it to image: (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…

I resolved by adding " --mysql-native-password=ON" in tutor/templates/local/docker-compose.yml under mysql settings.

  • For connection strings charset update, we already have a PR merged and a new version released (v18.1.0) for that feat!: upgrade default mysql charset and collation to utf8mb4 by Danyal-Faheem · Pull Request #1084 · overhangio/tutor · GitHub. This will update it for connection only, we will be merging a PR later to upgrade columns and tables to new charset and collations accordingly.
  • –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.
1 Like

Tutor 18.1.1 has been released to fix this issue tutor · PyPI