** Description changed:

+ [Impact]
+ 
+ When upgrading from MySQL 8.0 to 8.4, the mysql_native_password plugin
+ is disabled by default, causing accounts using mysql_native_password to
+ be locked out. This happens during noble to resolute upgrades.
+ 
+ A fix for this should be backported to resolute to avoid breaking valid
+ account configurations from noble, keeping users from being locked out
+ of accounts.
+ 
+ This issue is fixed by adding a quirk to ubuntu-release-upgrader that
+ checks for mysql_native_password usage without explicit enablement in
+ config, and blocks it if so.
+ 
+ [Test Plan]
+ 
+ There are multiple upgrade paths that must be tested:
+ 
+ First, the base case, where no mysql_native_password accounts exist.
+ Check that the upgrade completes without any block.
+ 
+ Second, there are users using mysql_native_password, but the plugin is
+ explicitly enabled in the mysqld configuration with some form of
+ mysql_native_password=ON. Check that the upgrade completes without a
+ block and that the config still works after the upgrade.
+ 
+ Finally, there are users using mysql_native_password and the plugin is
+ not explicitly enabled. Confirm the user is notified, and the upgrade is
+ blocked.
+ 
+ [Where problems could occur]
+ 
+ Due to the addition of a new quirk, problems could occur with systems
+ being blocked with valid configurations. This could be due to a failure
+ to properly read the database to check for mysql_native_password users.
+ 
+ [Other Info]
+  
+ stonking currently has the exact same update released in 1:26.10.8, though it 
instead searches for updates from 8.4 to 9.7 where mysql_native_password is 
removed completely.
+ 
+ [Original Description]
+ 
  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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2158525

Title:
  mysql root account locked out after upgrade to 26.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/2158525/+subscriptions


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

Reply via email to