Repository navigation
install_nextcloud: support MySQL 8.4 (Ubuntu 26.04) in db_mysql.yml - #478
Open
Adfinis-Freund wants to merge 3 commits into
Open
Adfinis-Freund wants to merge 3 commits into
Adfinis-Freund wants to merge 3 commits into
Conversation
Signed-off-by: Michael Freund <michael.freund@adfinis.com>
Signed-off-by: Michael Freund <michael.freund@adfinis.com>
Signed-off-by: Michael Freund <michael.freund@adfinis.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Member
|
Hello there @Adfinis-Freund thank you for reporting this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI (if applicable)
Fixes
#477What this changes
roles/install_nextcloud/tasks/db_mysql.ymlmysql --versiononce (nc_mysql_version,nc_mysql_is_mariadb) and use version comparisons instead of substring matches like'5.7.' in ....ALTER USERtask. The authentication plugin is now set explicitly, becauseALTER USER ... IDENTIFIED BYalone keeps the current plugin (auth_socketon Debian/Ubuntu):WITH mysql_native_password(unchanged behaviour)WITH caching_sha2_password(mysql_native_passwordis disabled by default)IDENTIFIED BYSET PASSWORD = PASSWORD(...)is gone, as the function was removed in MySQL 8.0.no_log: true, and the SQL is passed viaargvinstead ofshell.plugin_auth_stringtogether withplugin: caching_sha2_passwordinstead ofpassword. Thepasswordparameter ofcommunity.mysql.mysql_useralways results in amysql_native_passwordhash (CREATE USER ... IDENTIFIED WITH mysql_native_password AS '<hash>'), which fails on 8.4 with error 1524. On MySQL 8.0 and MariaDB the task behaves as before.python3-cryptography, which PyMySQL needs forcaching_sha2_passwordon non-socket connections.roles/install_nextcloud/files/mysql_nextcloud.cnfinnodb_large_prefixandinnodb_file_format, both of which no longer exist in MySQL 8.0+.Testing
Each test used a fresh VM, followed by a second run of the role.
Verified with
SELECT user, host, plugin FROM mysql.user:rootand the Nextcloud user usecaching_sha2_password.rootand the Nextcloud user usemysql_native_password, as before.Not tested: MariaDB (
nextcloud_db_backend: mariadb, e.g. Debian), Ubuntu 25.x, MySQL 5.7.Behaviour changes to be aware of
SET PASSWORD = PASSWORD(...)). It now usesALTER USER ... IDENTIFIED BY, which MariaDB supports since 10.2. This path is untested.PASSWORD()does not exist in the supported distributions.plugin_auth_stringcannot be compared with the stored hash, so the task usesupdate_password: on_create. This keeps it idempotent, but changingnextcloud_db_pwdlater does not update an existing user on MySQL >= 8.4.Checklist