Not able to login into mysql database in RHEL7

Solution Verified - Updated -

Issue

  • While login into mysql database , throwing an error:
$ mysql -u root -p -S /home/lib/mysql/mysql.sock/
Entered the password.
ERROR 2002 (HY000) : Can't connect to local MySQL server through socket '/home/lib/mysql/mysql.sock/' (2)

Environment

Red Hat Enterprise Linux 7
Red Hat Software Collections
mysql55

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content