• Register
0 votes
43 views

Problem :

My problem started with me when I was unable to log in as root any more on the mysql install. I was trying to run mysql without passwords turned on... but whenever I ran the below command

# mysqld_safe --skip-grant-tables &

I would never get my prompt back to just start typing my SQL commands to reset my password.

When I try to kill it by pressing ctrl +c I get the below message:

error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'

Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I had also faced the same error in the recent past.

This error usually occurs due to the multiple installations of mysql.

You need to Run the below command :

ps -A|grep mysql

Kill your process by using below command :

sudo pkill mysql

And after that you need to run the below command :

ps -A|grep mysqld

Also Kill your process by running below command :

sudo pkill mysqld

Now you are completely set just you need to run the below commands :

service mysql restart
mysql -u root -p

That’s it you are all set now !! Have a very well working Mysql again !!

 

9 7 4
38,600 points

Related questions

0 votes
1 answer 71 views
71 views
Problem : My problem kicked off when I was unable to log in as the root any more on the mysql install. I was trying to run mysql without the passwords turned on however when I ran my below command : # mysqld_safe --skip-grant-tables & I never got my prompt back. ... socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
asked Jan 4, 2020 alecxe 7.5k points
1 vote
1 answer 25 views
25 views
Problem : I am very new to MySQL Server. I am newly assigned to this MySQL Server project. If I try to connect with the local MySQL server during my assigned test suite it shows me the below error: "Can't connect to local MySQL server through socket '/tmp/ ... that exception I can connect with my exact same parameters. I am very confused about above error. Can some expert help me in fixing it?
asked Apr 8, 2020 morrisBson 3.2k points
1 vote
1 answer 135 views
135 views
Problem : Encountered bellow docker error cannot connect to the docker daemon at unix:///var/run/docker.sock. is the docker daemon running?
asked Nov 8, 2019 peterlaw 6.9k points
1 vote
1 answer 429 views
429 views
Problem: I have fundamental knowledge of MySQL server. My MySQL server is on the CentOS and it has been working as expected but all of a sudden I am unable to restart my mysqld today. If I try to execute below command it shows me failed. # /etc/rc.d/ ... lib/mysql 151129 15:54:37 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended Kindly guide me in fixing above MySQL related error.
asked Jun 1, 2020 Martin K 6.6k points
1 vote
1 answer 159 views
159 views
Problem : Facing the weird following issue cannot connect to the docker daemon at unix:///var/run/docker.sock. is the docker daemon running?
asked Nov 8, 2019 peterlaw 6.9k points
0 votes
0 answers 30 views
0 votes
1 answer 108 views
108 views
Problem : I am very new to the Linux but want to set up my MySQL databases on the Amazon ec2 instance. I have followed some directions I found about resetting a user login pass by using a --skip-grant-tables option of the MySQL. Now I want to add my user ... HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement How can I turn above option off?
asked Jan 30, 2020 jwilliam 3.9k points
1 vote
2 answers 234 views
234 views
Problem : Is there anything I can do to solve the following problem? unable to connect to upstart: failed to connect to socket /com/ubuntu/upstart: connection refused
asked Nov 11, 2019 peterlaw 6.9k points
1 vote
1 answer 47 views
47 views
Problem: I want to install one package named speech_tools-2.1-release.tar.gz. After I run the command ./configure in this package, it shows me a message:\ Configure: error: no acceptable C compiler found in $PATH See 'config.log' for more details Any solution would be much appreciated. Thanks.
asked Mar 10, 2020 Gavin 15.3k points