I tried to install mysql-server into my Ubuntu server
sudo apt-get install mysql-server
and I also installed phpmyadmin however it didn't work, when I typed the word mysql either with or without any arguments it always said:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
then I tried to remove, purge, install again many times it kept on giving errors I also tried to delete all the files related to mysql, still didn't work then I tried a clean install on a different dedicated server of the same version and it was giving the same exact problem, but I installed it the same way on ubuntu 14.04 and it worked without problems