Cant connect to local web interface in Raspbx

Hi im working on my RasPBX server used for my home server and i was setting up a soundpoint ip 450 in the process, then, the interface got reset.

Raspberry PI 3 Model B

Exception (2002)
SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)::SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
and when i go to the directory, theres nothing in there. and mysql is not running when i type mysql and basically gives me the same error.

Stack frames (8)
7
Exception
/var/www/html/admin/libraries/utility.functions.php204
6
die_freepbx
/var/www/html/admin/libraries/BMO/Database.class.php142
5
PDOException
/var/www/html/admin/libraries/BMO/Database.class.php137
4
PDO __construct
/var/www/html/admin/libraries/BMO/Database.class.php137
3
FreePBX\Database __construct
/var/www/html/admin/libraries/BMO/FreePBX.class.php71
2
FreePBX __construct
/var/www/html/admin/bootstrap.php153
1
require_once
/etc/freepbx.conf9
0
include_once
/var/www/html/admin/config.php100

Raspberry’s have a habit of doing that, if things go sideways the sd card gets corrupted , if mysql can repair its databases ( with human intervention needed , ask google) both it (mysqld) and your system might recover. If not . . . .

Always have a recent copy of the sd card somewhere , I use this

#!/bin/bash
ROOTPART=$( mount|grep " / "|awk '{print $1}')
BOOTDISK=$( mount|grep " / "|awk '{print $1}'|sed 's/p[0-9]//')
DATE=$(date +%Y%m%d%H%M)
MBS=$(( $(parted $ROOTPART unit MB print|sed -n 'x;$p' |sed 's/ [12] *[0-9\.MB]*  \([0-9]*\).*/\1/') +4 ))
time  dd if=$BOOTDISK bs=1M count=$MBS|pv -pbart --size=${MBS}m --width 25|ssh [email protected] "dd of=/dest/dir/RASPI-${1}${DATE}.img"

You will need a password less ssh login to IP.ADD.RESS.OFHOST and /dest/dir must exist and be writable by ‘you’ and install pv on the pi so it entertains while backing you up

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