Can't connect to local MySQL server

Asked by UPT-BIT LIPI

(mediacore_env)extron@Extron:~/MediaCore-0.9.0$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
UPT-BIT LIPI
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you give the output of:

service mysql status

Thanks

Revision history for this message
UPT-BIT LIPI (j-admin-mail-bit-lipi-go-id) said :
#2

when I check the status of mysql, they gave me with the same error

(mediacore_env)extron@Extron:~/MediaCore-0.9.0$ mysql -u root status
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Revision history for this message
Federico Tello Gentile (federicotg) said :
#3

That is not the command you were told to run.
Run

service mysql status

not mysql -u root status

Revision history for this message
UPT-BIT LIPI (j-admin-mail-bit-lipi-go-id) said :
#4

I've try to run:
sudo service mysql status
and show this message:
mysql: unrecognized service

I also try this:
sudo service mysql start
and show this message again:
mysql: unrecognized service

Revision history for this message
Federico Tello Gentile (federicotg) said :
#5

Mysql is not installed. Install it.

Revision history for this message
UPT-BIT LIPI (j-admin-mail-bit-lipi-go-id) said :
#6

I've install it. And fix my problem. thx a lot.