Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) on subsequent connection through terminal

view story

http://serverfault.com – My sincere apologies for asking something that obviously has been answered before. The fact that I'm posting is that i would like to be absolutely sure since it's about a live server running currently. This is what happened. I'm accidentally the sysadmin for a dedicated server. There is tomcat running on the machine and using mysql as database. I in the process of installing OpenCart happen to install curl, gd and mysql through apt-get install curl libcurl3 libcurl3-dev php5-curl restart apache2 apt-get install php5-gd restart apache2 apt-get install libapache2-mod-auth-mysql php5-m (HowTos)