Mysql is offline when updating


I have the following problem. if I update my ubuntu 22.04 with the following command “apt update && apt upgrade -y” then the mysql goes offline right at the beginning. After update the mysql starts again but in the time where the update is running the mysql and with it the websites are offline. is there a solution for this? i could start the mysql again right after deactivating it in the panel but i don’t know if this disturbs the update process. another possibility would be to update the mysql first one by one and then the rest. unfortunately i don’t know the command for this.

best regards

It has nothing to do with Hestia…But it was MariaDB on default have no idea why…

yes right no hestiacp problem and I also meant MariaDB. Maybe someone else has a solution or can answer this question “Is it possible to start MariaDB after it goes offline without problems?”

You shouldn’t do that.

You can update the database manually at certain hours of the night.

You can clone the server move the DNS update and then change the DNS back again.

You can put a load balancer in front of the install and have several redundant servers.

You can cache all the front-end so that when it is offline only logged in users will notice.

that sounds good, how do I do that?

you can use the following command mariadb single udpdaten:

apt update
apt-get upgrade mariadb-server

but then it asks if the dependencies should be updated too. exactly these updates take a long time and keep mysql offline. can you update the dependencies later so that mariadb is offline only for a short time?

apt update

apt-mark hold mariadb-server

apt upgrade

apt-mark unhold mariadb-server

apt upgrade

thank you, i will try it with the next update :slightly_smiling_face:.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.