• Register
0 votes
113 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.

And my screen just looks like below:

root@jj-SFF-PC:/usr/bin# mysqld_safe --skip-grant-tables
030120 11:40:53 mysqld_safe Logging to syslog.
030120 11:40:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

And I never got my prompt to start typing my SQL commands to reset my password.

And when I tried to kill it by pressing the CTRL + C, I face 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!
 
7.5k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Please follow below steps to resolve your issue.

  1. Stop the MySql

           sudo /etc/init.d/mysqld stop

  1. Restart MySql or start MySql

           sudo /etc/init.d/mysqld restart or sudo /etc/init.d/mysqld start

  1. Make the link like below and give it to your system

           ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

  1. Run the secure installation which will guide you through all the process that you need to follow to configure your mysql

           /usr/bin/mysql_secure_installation

38.6k points

Related questions

0 votes
1 answer 30 views
30 views
Problem: HELP! I need help understanding this error > Cant connect to local mysql server through socket /var/run/mysqld/mysqld.sock
asked Apr 29 ummeshani 10.8k points
0 votes
1 answer 22 views
22 views
Problem: My problem started off with me not being able to log in as root any more on my mysql install. I was attempting to run mysql without passwords turned on... but whenever I ran the command # mysqld_safe --skip-grant-tables & I would never get the prompt back. I ... mysql-client again. But I've noticed that it doesn't prompt me for a password. Isn't it supposed to ask for an admin password?
asked Apr 20 munim01 21k points
1 vote
1 answer 28 views
28 views
Problem : I'm new to Linux and MySQL, I currenty have a LAMP, running on Ubuntu 14.04, yesterday everything was fine, but today my MYSQL is not working.I get the following error message: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) I have no ideia about what to do!
asked Mar 31 Sabbir Hossain 14.6k points
0 votes
1 answer 58 views
58 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 ... socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
asked Dec 27, 2019 alecxe 7.5k points
0 votes
1 answer 20 views
20 views
Problem: Give me a solution please : Can't connect to local mysql server through socket '/var/run/mysqld/mysqld.sock' (111).
asked Jun 13 Aurelia Maja 78.4k points
1 vote
1 answer 76 views
76 views
Problem: I am attemopting to run mysql without password but getting thios error. Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
asked Apr 24 PkGuy 25.9k points
0 votes
1 answer 50 views
50 views
Problem My problem started off with me not being able to log in as root any more on my mysql install. I was attempting to run mysql without passwords turned on... but whenever I ran the command # mysqld_safe --skip-grant-tables & I would never get the prompt back. I ... mysql-client again. But I've noticed that it doesn't prompt me for a password. Isn't it supposed to ask for an admin password?
asked Apr 20 munim01 21k points
0 votes
1 answer 45 views
45 views
Problem: How to fix this Error 2002 (hy000): can't connect to local mysql server through socket '/tmp/mysql.sock' (38).
asked Apr 1 rakib1 51.5k points
0 votes
1 answer 12 views
12 views
Problem: 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) Is there a solution for this error? What might be the reason behind it?
asked Apr 30 ochena 23.3k points
0 votes
1 answer 16 views
16 views
Problem: Is there a solution for this error? What might be the reason behind it?
asked Apr 28 salim1 60.6k points