I am getting the following error when I try to connect to mysql:
Can\'t connect to local MySQL server through socket \'/var/lib/mysql/mysql.sock\' (2)<
Can\'t connect to local MySQL server through socket \'/var/lib/mysql/mysql.sock\' (2)
If you are on a recent RHEL, you may need to start mariadb (an open source mysql db) instead of the mysql db:
yum remove mysql yum -y install mariadb-server mariadb service mariadb start
You should then be able to access mysql in the usual fashion:
mysql -u root -p