Issue with MySql Server connection

0 votes

I was able to connect to MySQL server a few days back but since today I am getting an error while connecting through the command line. Below is the error from the command line:

[user@localhost ~]$ sudo mysql -u root -p
[sudo] password for user: 
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
Jan 2 in Big Data Hadoop by digger
• 27,620 points
10 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Try to restart the mysqld server and then login:

sudo service mysqld restart
mysql -u root -p

If that doesn't not work then try the following:

sudo pkill mysql
sudo pkill mysqld
restart mysql
sudo service mysql restart

now you should be able to log in

mysql -u root -p
answered Jan 2 by Omkar
• 66,880 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Command to establish connection between MySql with linux?

This is the command you can use ...READ MORE

answered Apr 15 in Big Data Hadoop by Gitika
• 13,350 points

edited Apr 17 by Gitika 54 views
0 votes
1 answer

Running into an issue while running the mapred job on the server

Try this command hadoop dfs -put /var/tmp/students.txt / hadoop ...READ MORE

answered Dec 20, 2018 in Big Data Hadoop by Omkar
• 66,880 points
33 views
0 votes
1 answer

"Cant connect to local mysql server through socket "var/lib/mysql/mysql.sock" .

Seems like mysql.sock does not exist in the ...READ MORE

answered Dec 26, 2018 in Big Data Hadoop by Omkar
• 66,880 points
40 views
0 votes
1 answer

MySql connection localhost vs 127.0.0.1

The difference is that when you use localhost, ...READ MORE

answered Dec 26, 2018 in Big Data Hadoop by Omkar
• 66,880 points
45 views
0 votes
1 answer

Update hdfs data before stroring in MySql

Yes, you can update the data before ...READ MORE

answered Jan 27 in Big Data Hadoop by Omkar
• 66,880 points
18 views
0 votes
1 answer

Using Hadoop for Data Analytics.

Yes, your approach is correct - you ...READ MORE

answered Sep 28, 2018 in Big Data Hadoop by Frankie
• 9,710 points
23 views
0 votes
1 answer

How to open MySql console in Ubuntu?

sudo service mysqld restart mysql -u <username> root ...READ MORE

answered Dec 14, 2018 in Big Data Hadoop by Omkar
• 66,880 points
63 views
0 votes
1 answer

Facing the below error while installing mysql in VM

We would like to say that the ...READ MORE

answered Dec 21, 2018 in Big Data Hadoop by Omkar
• 66,880 points
44 views
0 votes
1 answer
0 votes
1 answer

Hbase: Client not able to connect with remote Hbase server

You have to remove the localhost entry from hbase server's ...READ MORE

answered Nov 8, 2018 in Big Data Hadoop by Omkar
• 66,880 points
297 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.