Error starting Mariadb (freepbx)

I have such problem when i rebooted my server
soo i get this error on GUI :

SQLSTATE[HY000] [2002] No such file or directory::SQLSTATE[HY000] [2002] No such file or directory

then i chechked if mariadb was running it wasn’t running when i try to start
i have this error :

Job for mariadb.service failed because the control process exited with error code. See “systemctl status mariadb.service” and “journalctl -xe” for details.

then i tried to remove ib_logfiles but still nothing
can anyone help mee ?
i have big info so i don’t want to reinstall mariadb but if i can backup database file (like i can see in vim /var/lib/mysql/asterisk/ some files ) if i can backup this and then take it in place then i can reinstall mariadb any sugestions? plz help

So what does

systemctl status mariadb.service

return after you try and starting the service?

● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2019-08-12 22:15:26 +04; 11min ago
Process: 24610 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
Process: 24609 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 24577 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 24609 (code=exited, status=0/SUCCESS)

Aug 12 22:15:23 freepbx.sangoma.local systemd[1]: Starting MariaDB database server…
Aug 12 22:15:23 freepbx.sangoma.local mariadb-prepare-db-dir[24577]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
Aug 12 22:15:23 freepbx.sangoma.local mariadb-prepare-db-dir[24577]: If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
Aug 12 22:15:23 freepbx.sangoma.local mysqld_safe[24609]: 190812 22:15:23 mysqld_safe Logging to ‘/var/log/mariadb/mariadb.log’.
Aug 12 22:15:23 freepbx.sangoma.local mysqld_safe[24609]: 190812 22:15:23 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Aug 12 22:15:26 freepbx.sangoma.local systemd[1]: mariadb.service: control process exited, code=exited status=1
Aug 12 22:15:26 freepbx.sangoma.local systemd[1]: Failed to start MariaDB database server.
Aug 12 22:15:26 freepbx.sangoma.local systemd[1]: Unit mariadb.service entered failed state.
Aug 12 22:15:26 freepbx.sangoma.local systemd[1]: mariadb.service failed.
this is what it is returns

i reinstalled mariadb and then take asterisk db and asteriskcdr dd in ~/mysql/ folder and changed some config file for freepbxuser password and granted all permissions but
now i get this error

Exception: fatal error reading freepbx_settings:: in file /var/www/html/admin/libraries/utility.functions.php on line 207

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