MYSQL Unable to start

Operating system: Centos
OS version: 8.3

I currently use Virtualmin X Webmin for hosting my private web server, i changed a couple of configuration options via control panel. these options were key_buffer_size and
max_connections, after that i clicked Saved and Restart to save and restart mysql with the new configuration… after i was presented with a error stating it failed to restart (DBI connect failed : Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)) from a short amount of research it seems everywhere suggests reinstalling mysql/mariadb but i was curious if there was any other solution to avoid data loss. if not what would be the best practise to reinstall mysql/mariadb and how would you go about avoiding this issue in the future.

Hello @Dazzah and welcome to the Virtualmin community forum.

Why not simply undo the configuration options that you had applied and restart MySQL? Bring the configuration to what it was when everything was running normally instead of reinstalling, is what I would suggest you do.

Ive already attempted that, seems to be no different

● mariadb.service - MariaDB 10.3 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2021-03-03 12:21:34 UTC; 7min ago
Docs: man:mysqld(8)
Process: 20570 ExecStart=/usr/libexec/mysqld --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER (code=exited, status=7)
Process: 20532 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mariadb.service (code=exited, status=0/SUCCESS)
Process: 20507 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
Main PID: 20570 (code=exited, status=7)
Status: “MariaDB server is down”

Mar 03 12:21:32 systemd[1]: Starting MariaDB 10.3 database server…
Mar 03 12:21:33 mysql-prepare-db-dir[20532]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
Mar 03 12:21:33 mysql-prepare-db-dir[20532]: If this is not the case, make sure the /var/lib/mysql is empty before running mysql-prepare-db-dir.
Mar 03 12:21:33 mysqld[20570]: 2021-03-03 12:21:33 0 [Note] /usr/libexec/mysqld (mysqld 10.3.27-MariaDB) starting as process 20570 …
Mar 03 12:21:34 systemd[1]: mariadb.service: Main process exited, code=exited, status=7/NOTRUNNING
Mar 03 12:21:34 systemd[1]: mariadb.service: Failed with result ‘exit-code’.
Mar 03 12:21:34 systemd[1]: Failed to start MariaDB 10.3 database server.

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