-2

I am trying to install mysql in ubuntu 18.04 in namecheap vps server but when I am trying to login to mysql using root, giving me this error

Stop MySQL service

sudo mysqld_safe --skip-grant-tables --skip-networking &

mysql -u root

giving me ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)

Community
  • 1
  • 1
  • What's your question? Also, might it be more appropriate to ask [Namecheap Support](https://www.namecheap.com/support/)? – Moob Sep 25 '19 at 17:42
  • Possible duplicate of [ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)](https://stackoverflow.com/questions/11657829/error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-var-run) – Progman Sep 25 '19 at 19:27

1 Answers1

0

You can run the following command on linux ubuntu to start mysql again.service mysql start Then you can use mysql monitor using command sudo mysql or mysql -u root.

Semper_fi
  • 25
  • 6