This machine is running an Owncloud instance, serving some internal NFS shares and used as a development machine for (cross-)compiling stuff, packaging etc.
The update went pretty smooth, only the mariadb instance used by Owncloud was hosed afterwards. There was no login possible and generally database users were gone.
Fortunately, I always have recent backups available, both a mysqldump and a complete file system backup.
So I tried to just restore the mysqldump on the updated database. This did not work, Bug#1166786.
Then I did just restore the filesystem backup of /var/lib/mysql and the database worked again.
Unfortunately, as I found out reproducing and investigating the issue, it would just get killed again by the next update, Bug#1166781. (Extra kudos to openSUSE Product Management which decided that this is not a bug, but instead regarded a feature!).
Finally I found the upstream bug in mariadb JIRA bugtracker, (which also does not look like there is much interest in fixing this), but with the information given there, I was able to fix this for me.
So all of you who are stuck with
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)after updating a mariadb instance to 10.4, this might help:
- restart mysqld with option --skip-grant-tables, to disable user authentication
- in the mysql database, execute
- ALTER TABLE user CHANGE COLUMN `auth_string` `authentication_string` text;
- DROP TABLE global_priv;
- now run the mariadb-upgrade command
- restart mariadb.service with default options
This fixed my instance and owncloud is working again.
Note that I am by no means a database expert. Take backups before performing these steps.
No comments:
Post a Comment