• Register
0 votes
54 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!
 
6 5 3
7,540 points

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

9 7 4
38,600 points

Related questions

0 votes
1 answer 38 views
38 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
1 vote
1 answer 14 views
14 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 morrisBson 3.2k points
1 vote
1 answer 42 views
42 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 147 views
147 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 Martin K 6.6k points