After Upgrade i get Exception: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket

There are a couple of ways to restart the database. The first is to issue a “service start mysqld” or the equivalent (could be “mysql” or “mariadb” instead of “mysqld”). Make sure the service starts with a ‘ps aux | grep mysql’ command at the console. This will tell you if the database server is started. If it is, the problem is probably in your Asterisk config. If it isn’t, look for the error file in the database data file directory (/var/db or /var/mysql/ for example). The should be a “hostname.err” where hostname is something like the name of your computer. The /etc/my.cnf file should have the default data store directory name.