Upgrade Appliance to opensuse 15.4
- Edited
BTW: if you have an mysqldump from before the upgrade you can just drop all databases and import that dump
mysqldump --all-databases > dump.sql
something like this should do the trick
grommunio-2022121:~ # #zypper remove mariadb ; rm -Rf /var/lib/mysql/* ; zypper install mariadb ;systemctl enable --now mariadb.service ; mysql < dump.sql
I will create a dump of the database of my backup machine and will give it a try.
Thank's so far!
The reinstallation of MariaDB wasn't sucessfull. I'm getting a timeout failure and I cannot import the dump of my database.
On removing MariaDB I get following message:
warning: /etc/my.cnf saved as /etc/my.cnf.rpmsave
rm: cannot remove '/var/lib/systemd/migrated/mariadb': No such file or directory
rm: cannot remove '/var/lib/systemd/migrated/mariadb': No such file or directory
rm: cannot remove '/var/lib/systemd/migrated/mariadb-extra': No such file or directory
rm: cannot remove '/var/lib/systemd/migrated/mariadb': No such file or directory
The reinstallation is successful but starting the service stops with:
Job for mariadb.service failed because a timeout was exceeded.
See "systemctl status mariadb.service" and "journalctl -xeu mariadb.service" for details.
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysql/mysql.sock' (2)
Running journalctl gives this output:
....
Feb 20 18:20:07 mail mysql-systemd-helper[1937]: Phase 2/7: Installing used storage engines... Skipped
Feb 20 18:20:07 mail mysql-systemd-helper[1937]: Phase 3/7: Fixing views
Feb 20 18:20:07 mail mysql-systemd-helper[1937]: mysql.user OK
Feb 20 18:20:07 mail mysql-systemd-helper[1937]: Phase 4/7: Running 'mysql_fix_privilege_tables'
Feb 20 18:29:57 mail systemd[1]: mariadb.service: start-pre operation timed out. Terminating.
Feb 20 18:29:57 mail systemd[1]: mariadb.service: Control process exited, code=killed, status=15/TERM
Subject: Unit process exited
...
Obviously running the task 'mysql_fix_privilege_tables' crashes
I increased the timeout to 600 sec. via systemctl edit mariadb.service
but this had no effect.
Thanks for any help.
Also bei mir sieht das unter systemctl so aus:
mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2023-02-21 03:01:06 CET; 15h ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 1263 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install (code=exited, status=0/SUCCESS)
Process: 1284 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade (code=exited, status=0/SUCCESS)
Main PID: 1295 (mysqld)
Status: "Taking your SQL requests now..."
Tasks: 25 (limit: 4915)
CGroup: /system.slice/mariadb.service
└─ 1295 /usr/sbin/mysqld --defaults-file=/etc/my.cnf --user=mysql
Feb 21 03:01:05 mail systemd[1]: Starting MariaDB database server...
Feb 21 03:01:05 mail mysql-systemd-helper[1295]: 2023-02-21 3:01:05 0 [Note] /usr/sbin/mysqld (server 10.6.10-MariaDB) starting as process 1295 ...
Feb 21 03:01:06 mail systemd[1]: Started MariaDB database server.
und der status der Maria gibt:
MariaDB [(none)]> status
mariadb Ver 15.1 Distrib 10.6.10-MariaDB, for Linux (x86_64) using EditLine wrapper
Connection id: 121
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: less
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 10.6.10-MariaDB MariaDB package
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8mb4
Db characterset: utf8mb4
Client characterset: utf8mb3
Conn. characterset: utf8mb3
UNIX socket: /run/mysql/mysql.sock
Uptime: 15 hours 13 min 26 sec
Threads: 22 Questions: 46134 Slow queries: 0 Opens: 44 Open tables: 37 Queries per second avg: 0.841
Damit läuft es bei mir einwandfrei!
Luckily I finally got it back running!!
Sometimes you have just to be patient. :-)
After setting the TimeoutStartSec=infinity
option in mariadb.service and then systemctl enable --now mariadb.service
and let MariaDB take the time it needs (...having a beer) finally the service started.
Import of the database dump and a reboot as final steps and Grommunio is back up and running with 2022.12.1.
Thanks for the support! Great community here!
Ahh, so maybe a manual start once would have sufficed as well ..
Yes, but w/o setting the timeout to infinity I would have had no success. For whatever reason, the default timeout limit of 90 sec. (and even 600 sec. I tried as well) was too short for my VM. In general I have no performance problems, but in this case...
I'm glad it went so smoothly at the end. Only one or two grey hairs more... :-)
Grummel
Perhaps your installation needed more time to migrate. I found the following message on the upgrade from 15.3 to 15.4
Message from package mariadb:
WARNING: You are upgrading from different stable version of MySQL!
Your database will be migrated automatically during next restart of MySQL.
Before you do that make sure you have up to date backup of your data. It
should be mainly in /var/lib/mysql directory.
It wouldn't have worked as he said because somehow his VM didn't perform well for whatever reason.
Here you can see the .service-File which hasn't got any "TimeOutStartSec"-Setting and therefore defaults to the Value of '90' from /etc/systemd/system.conf (DefaultTimeoutStartSec).
So if the Service won't signal it's successfull Start within those 90 seconds it will always "fail" and stop.
BusinessTux simply do a systemctl restart mysql
, this will upgrade the database, if it fails, you have an mysql issue.