Broken MariaDB installation


I managed to mess up my database installation and now I need your help.

I guess it started after a general update on the server (sudo apt update & sudo apt upgrade). Suddently I only get the ‘Internal Server Error’ page when trying to access my nextcloud installation.
I started to mess around with my installation and ended up having troubles to completely uninstall mariadb-server and mysql-server. After some time, I finally managed to reinstall mariadb-server but I can not start the service. I still get the message:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

Any instructions for a complete and clean reinstallation of the mariadb service would be very much apreachiated! Thank you very much!

I have a backup of the database but I need to get the software running again.

I think this problem can be solved because you’re definitely not the first one running into that problem. Please use the search function first, which will help you getting the problem fixed:

Hi @j-ed , thanks for your answer.

I searched a lot before I posted here yesterday. And I do find several topics with this MySQL server error here as well, but those are all dead ends, e.g.:

I was hoping to find someone who had the same issue and was able to solve it.

My nextcloud is running on an Ubuntu 20.04 server. I have no container or docker installation. I wanted to fix the software on the server…

What about this: