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
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 vps.dazzah.xyz systemd: Starting MariaDB 10.3 database server…
Mar 03 12:21:33 vps.dazzah.xyz mysql-prepare-db-dir: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
Mar 03 12:21:33 vps.dazzah.xyz mysql-prepare-db-dir: 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 vps.dazzah.xyz mysqld: 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 vps.dazzah.xyz systemd: mariadb.service: Main process exited, code=exited, status=7/NOTRUNNING
Mar 03 12:21:34 vps.dazzah.xyz systemd: mariadb.service: Failed with result ‘exit-code’.
Mar 03 12:21:34 vps.dazzah.xyz systemd: 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.