Ubuntu 25.04 - plugin 'mysql_native_password' is not loaded

For discussion of topics specific to MythTV on linux
Post Reply
edmcguirk
Junior
Posts: 25
Joined: Mon May 14, 2018 5:52 pm
United States of America

Ubuntu 25.04 - plugin 'mysql_native_password' is not loaded

Post by edmcguirk »

When I updated to Kubuntu 25.04 the backend failed to start with the error:
plugin 'mysql_native_password' is not loaded

I used the #1 - Not Recommended solution because I do not understand how to set up caching_sha2_password

I am guessing that when I am upgraded to MYSQL 9.0 this fix will not work?

This is the AI generated solution:
Here's how to address the issue:

1. Temporarily Enable mysql_native_password (Not Recommended for Security):
Add the line mysql_native_password=ON to the [mysqld] section of your MySQL configuration file /etc/mysql/my.cnf.
Restart the MySQL server.


2. Migrate to caching_sha2_password (Recommended for Security):
Identify users:
.
Use the query SELECT user, host, plugin FROM mysql.user WHERE plugin='mysql_native_password'; to find users still using mysql_native_password.
Update users:
.
Run the following command for each user to change their authentication plugin:

ALTER USER '<USERNAME>'@'<HOST>' IDENTIFIED WITH caching_sha2_password BY '<PASSWORD>';

Replace <USERNAME>, <HOST>, and <PASSWORD> with the actual values for each user.
Remove the plugin line: Delete the mysql_native_password=ON line from your MySQL configuration file.


3. Consider Using the --default-auth option:
For MySQL client tools, you can use the --default-auth option to specify a default authentication plugin, but the server will override this if the user's server-side plugin requires a different one.
Example: mysql --default-auth=mysql_native_password ....


Important Considerations:
The mysql_native_password plugin is deprecated and uses the weaker SHA-1 algorithm, which is vulnerable to attacks. Migrating to caching_sha2_password or a stronger authentication method is recommended for security.
MySQL 9.0 removes the mysql_native_password plugin entirely.
If you're using Docker, ensure your MySQL image is configured to enable mysql_native_password if you need to use it, or to use caching_sha2_password if you're migrating.
Last edited by edmcguirk on Tue May 20, 2025 2:32 am, edited 2 times in total.
white_haired_uncle
Senior
Posts: 666
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Ubuntu 25.04 - plugin 'mysql_native_password' is not loaded

Post by white_haired_uncle »

edmcguirk wrote: Tue May 20, 2025 12:17 am When I updated to Kubuntu 25.04 the backend failed to start with the error:
plugin 'mysql_native_password' is not loaded

I used the #1 - Not Recommended solution because I do not understand how to set up caching_sha2_password

I am guessing that when I am upgraded to MYSQL 9.0 this fix will not work?
As long as mysql drops mysql_native_password as planned, that is correct.

There's an open ticket on this https://github.com/MythTV/mythtv/issues/1076.

For now, what you have done should be just fine.
Post Reply