MySQL database on FreePBX 13 has refused to connect on startup. it generates the error below. I have tried many suggestions on this forum but still not working.
'Exception: SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)::SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in file /var/www/html/admin/libraries/utility.functions.php on line 204
Stack trace:
- Exception->() /var/www/html/admin/libraries/utility.functions.php:204
- die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php:136
- PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:133
- PDO->__construct() /var/www/html/admin/libraries/BMO/Database.class.php:133
- FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.class.php:69
- FreePBX->__construct() /var/www/html/admin/bootstrap.php:139
- require_once() /etc/freepbx.conf:9
- include_once() /var/lib/asterisk/bin/fwconsole:12 ’
Please someone help on how I can repair the database.