It turned out to solve the problem like this # sudo apt install mariadb-server mariadb-client
now:
the question is whether it is necessary to install the mariadb-client in this case?
And do the settings (configs), databases get lost when reinstalling?
Maybe there is some more correct method of solving the problem in the future?
Why is it that when I do systemctl restart mariadb
it goes into the masked state and does not start at all until you reinstall it?
How to properly restart mariadb?