I am dealing with an old machine that had a power failure (at least 5 years old, but I am not sure how to check the exact version)
I am getting the following error:
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 120
I ran " service mysqld restart"
But I am getting an error of “Failed to restart mysqld.service: Unit not found”
If it’s an old enough distro or a custom install, you might not have a mysqld service, or it might have a different name… or it might be launched from a script dumped in rc.local.
You can check # asterisk -V, but that’s hardly relevant. If you need to get mysql running, your OS/version is more important. Check for /etc/system-release. You might find some mysql config info in /etc/my.cnf (or somewhere similar).