The most likely cause for this error is that your mysql server is not running. When you type in mysql
you are executing mysql client.
Try:
# sudo service mysql start
# mysql
Update (after OP included log in the question; taken from the comments below):
Thanks, saw your log. The log is saying the mysql user doesn't have proper access rights. I'm assuming your mysql user is mysql(this can be verified in
/etc/my.cnf
, execute
chown -R mysql:mysql /var/lib/mysql
and try starting
mysqld
again.