Help mysql en centos connect failed

I have the following server
Operating system CentOS Linux 8.4.2105
Webmin version 1.973
Usermin version 1.823
Virtualmin version 6.16
Authentic theme version 19.73
Time on system Monday, August 2, 2021 1:25 AM Kernel and CPU Linux 4.18.0-305.7.1.el8_4.x86_64 on x86_64
Processor information AMD EPYC 7282 16-Core Processor, 8 cores
Real memory 1.06 GiB used / 514.31 MiB cached / 29.24 GiB total Local disk space 84.26 GiB used / 702.15 GiB free / 786.42 GiB total

Where from one day to the next the server

MariaDB Database Server
MySQL version 10.3.28-MariaDB

Error! MariaDB is not running on your system - database list could not be retrieved.

MariaDB error messageThe full MariaDB error message was : DBI connect failed : Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
it’s not the first time that happens to me
the first time I reinstalled the operating system now the same thing happened to me

I need to find my error and solution so that it does not happen to me again if you have reference or help please

Well, that’s an absolutely bonkers thing to do in response to a service failing. It’s a huge waste of time to reinstall every time anything you don’t understand happens, and you’ll never learn anything about how your system works.

Restart the service (systemctl restart mariadb) and then look in the journal for clues about why it fails to start (something like journalctl -xe and/or journalctl -n 100 -u mariadb).

I understand what you mention
but I got to delete the mysql and reinstall from 0 but I still have the problem
For the reason that I am asking for help and I told the procedure that I do and I also searched and information to solve the problem but it did not work for me.

from the aforementioned it gave me this error and I don’t know what to do to solve it if you can help me or guide me please

Aug 02 01:04:56 localhost systemd[1]: Starting MariaDB 10.3 database server…
Aug 02 01:04:56 localhost mysql-prepare-db-dir[12364]: Database MariaDB is probably initialized in /var/lib/mysql a>
Aug 02 01:04:56 localhost mysql-prepare-db-dir[12364]: If this is not the case, make sure the /var/lib/mysql is emp>
Aug 02 01:04:56 localhost mysqld[12403]: 2021-08-02 1:04:56 0 [Note] /usr/libexec/mysqld (mysqld 10.3.28-MariaDB) >
Aug 02 01:04:56 localhost systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Aug 02 01:04:56 localhost systemd[1]: mariadb.service: Failed with result ‘exit-code’.
Aug 02 01:04:56 localhost systemd[1]: Failed to start MariaDB 10.3 database server.
Aug 02 01:05:45 localhost systemd[1]: Starting MariaDB 10.3 database server…

WTF!? Why do you keep doing that!? Stop reinstalling stuff when you don’t understand it! I can’t help you if you keep insisting throwing everything away and undoing everything the Virtualmin installer did for you.

Then again, since you’ve already broken your system in ways I can’t predict or understand, it probably is simplest for you to start with a freshly installed, supported, operating system and install Virtualmin using the install script. So, maybe reinstalling one more time is the best course of action.

But, after that, stop intentionally breaking shit and then expecting us to clean it up for you.

I stop working from one day to the next I have a system that occupies mysql so I ask for help

But, not before you broke it beyond easy repair with “delete the mysql and reinstall from 0 but I still have the problem”.

You can’t just remove system services, and all of their configuration, install again, and magically expect it to work with Virtualmin. Especially a database, which has data and passwords.

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