Mysql_upgrade not run on upgrade to 11.0.0 (Koa)

Upgrading from 10.5.1 to 11.0.0, get an error that mysql_upgrade didn’t run.
Solved it by connecting to mysql container

docker container exec -it tutor_local_mysql_1 bash

and manually executing

mysql_upgrade -u root -password="…"

1 Like

Hi! Can you please describe how you upgraded, which command you ran and what was the exact output?

I upgraded from a running 10.5.1 version by downloading the new tutor binary, and issuing the “tutor local quickstart” command.

Don’t have copies at hand of the actual console output, but saw complaints about not having run “mysql_upgrade”.

Even so, the site didn’t run anymore.

So I completely wiped out everything pertaining to tutor from my server (as edx was installed up to now for tests) with:

docker system prune -a --volumes

Also removed all data from the “local” install dir except “config.yml”, and started the installation from fresh with “tutor local quickstart”, went to sleep a bit (4 AM) while the install was running.

Still not able to run, some port problem with nginx / reverse proxy, but now I see there are important changes in the documentation under “Running Open edX behind a web proxy”, trying to figure it out with the information provided there.

For the record, you shouldn’t ever have to delete your production data. Instead, if the upgrade failed the first time, you should run tutor local upgrade --from=juniper. Then run tutor local quickstart. The upgrade step is part of the quickstart process only the first time you run it, so you might have to run manually if it fails for some reason.

1 Like

I ran into the same issue (complaining about the number of users being off by two), upgrading with tutor config save to accomodate the new/changed parameters and tutor local start -d.

I also ran mysql_upgrade from

$ tutor local exec mysql bash
docker-compose -f /srv/openedx/.local/share/tutor/env/local/docker-compose.yml -f /srv/openedx/.local/share/tutor/env/local/docker-co
mpose.prod.yml --project-name tutor_local exec mysql bash                                                   
root@22ee93dfaf9f:/# mysql_upgrade -u root --password="XXXXX"          
mysql_upgrade: [Warning] Using a password on the command line interface can be insecure.                                             
Checking if update is needed.                                  
Checking server version.                                        
Running queries to upgrade MySQL server.                                                
...

And later realized that tutor local upgrade might have helped, although it was not a named release change.

There was no data loss of any kind.