Hosted Vicidial server starts from $39 Contact Us Buy Now!

vicidial MySQL connect ERROR: Can't connect to local MySQ

Estimated read time: 1 min

vicidial MySQL connect ERROR: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

vicidial MySQL connect ERROR



***************************
Error:
***************************

vicidial MySQL connect ERROR: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

***************************
Cause for the above error:
***************************

  • Mysql crashed or mysql stopped 
  • Either the vicidial server shutdown all of sudden due to powercut or imporper shutdown (pressing the powerbutton directly) 
  • Overload of server leads to mysql crash 
  • Shortage of Harddisk space

***************************
Hardisk space issue
***************************
Type  the below command in linux shell to check whether the harddisk is full

df -h

if it displays below output , you need to delete some unwanted files
/dev/mapper/VolGroup00-LogVol00 446G 54G 0 100% /

****************************
Deleting the call Recordings
****************************
In Vicidial ,the Recordings and Logs will occupy the Harddisk fast.
Delete the files  under  /var/spool/asterisk/monitorDONE/ORIG    at weekly schedule
follow the below command to delete the file from ORIG folder

cd /var/spool/asterisk/monitorDONE/ORIG
rm -rf  *

If the above command throughs error like below
Cannot delete, file too long
then run the below command
find . -type f -name "*.wav" | xargs -l500 rm -f

You also need to delete the Voice files from var/spool/asterisk/monitor/MP3 or GSM

cd /var/spool/asterisk/monitor/MP3
rm -rf *

****************************
Deleting the Logs
****************************
cd /var/log/asterisk
rm -rf  messages.*

cd /var/log/httpd/
rm -rf error.*
rm -rf acces.*

****************************
Repairing the Mysql
****************************
Once the unwanted files deleted run the mysql repair command

mysqlcheck -u cron -p --auto-repair --check --optimize --all-databases
password;1234

****************************
Troubleshoot for the powercut , overload 
****************************

Just run the mysql repair command for the above issues.
mysqlcheck -u cron -p --auto-repair --check --optimize --all-databases
password: 1234

Once finished the troubleshooting , reboot the server once, and then login as agent .

****************************
Also see:
Solving Vicidial Time sync error clickHere
Solving vicidial no one in your session Clickhere
Solving zero leads in hopper issue ClickHere

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.