Sqlstate[hy000] [2002]

Hello,

I was originally having an issue with the Web GUI not loading on this thread.

I did a reboot and now it seems MySQL is not running at all.

Based on other threads, I tried manually starting MySQL and that doesn’t work. fwconsole commands also do not work. I’m at a loss as to what needs to happen next. I also can’t issue the suggested commands to repair the database.

[root@belpbx     /]# fwconsole    
Exception: S    QLSTATE[HY000] [2002] No such file or directory::SQLSTATE[H    Y000]     [2002] No su    ch file or directory in file /var/www/html/admin/libraries/    utility.func    tions.php on line 204    
Stack trace:    
  1. Exception->() /var/www/html/admin/libraries/utility.functions.php:    204
  2. die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php    :142
  3. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.    php:137
  4. PDO->__construct() /var/www/html/admin/libraries/BMO/Database.clas    s.php:137
  5. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/    FreePBX.class.php:69
  6. FreePBX->__construct() /var/www/html/admin/bootstrap.php:153
  7. require_once() /etc/freepbx.conf:9
  8. include_once() /var/lib/asterisk/bin/fwconsole:12

[root@belpbx /]# mysqlcheck --repair --use-frm --all-databases    
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket     '/var/lib/mysql/mysql.sock' (2) when trying to connect

I think I’m back!

yum reinstall mariadb mariadb-server

Then
systemctl start mariadb.service

1 Like

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