You have been subscribed to a public bug:

Once upon a time there were one or two Ubuntu LTS releases where installing the 
mysql server ('apt install mysql-server') followed by 
'mysql_secure_installation' would raise errors. See e.g. #1980466.
Before this was fixed, a widely published workaround was to:
1. apt install mysql-server
2. Set the mysql root password by invoking the mysql command-line client as the 
Linux root user and issue
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 
'my_password';
3. mysql_secure_installation

I used this workaround on some systems. They were fine when upgrading to
Ubuntu 22.04 LTS and 24.04 LTS, although the default and recommended
authentication method/plugin shifted towards caching_sha2_password along
the way.

Last week I upgraded such a system with the above-mentioned workaround to 
Ubuntu 26.04 LTS (with
'do-release-upgrade -d'). This upgrades mysql to 8.4 and the plugin for 
handling mysql_native_password is not loaded by default, so I was more or less 
locked out of the mysql root account. This can be fixed by
temporarily enabling this authentication method in the mysqld configuration and 
then changing the root password to something IDENTIFIED WITH 
caching_sha2_password and then changing the config back.
However, this comes across as an upgrade that is a little bit less smooth than 
I am used to, and the Ubuntu upgrade could warn for this in case there are 
important accounts or any accounts within mysql that are using the 
mysql_native_password authentication method before upgrade, perhaps offering to 
keep the plugin enabled.

** Affects: mysql-8.4 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
mysql root account locked out after upgrade to 26.04
https://bugs.launchpad.net/bugs/2158525
You received this bug notification because you are a member of Ubuntu Bugs, 
which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to