I'm on Linux Mint, and following the instructions here to reset the MySQL root password.

~$ sudo /etc/init.d/mysql stop
[ ok ] Stopping mysql (via systemctl): mysql.service.

~$ sudo mysqld_safe --skip-grant-tables &
[1] 6377
insight@insight-virtual-machine:~$ 2019-05-17T03:56:54.180300Z mysqld_safe Logging to syslog.
2019-05-17T03:56:54.185606Z mysqld_safe Logging to '/var/log/mysql/error.log'.
2019-05-17T03:56:54.190497Z mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists.

~$ mysql -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[1]+  Exit 1                  sudo mysqld_safe --skip-grant-tables

How can I run the mysql -uroot command successfully?

  • 1
    -1 for having an error in plain English on the question that was ignored. – Rui F Ribeiro May 17 at 7:35
  • I don't understand what you mean @RuiFRibeiro. – Steve May 20 at 2:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.