尝试查询mysql状态时出错

时间:2015-10-27 21:05:03

标签: mysql linux

我正在尝试查看mysql是否正在运行。当我这样做时:

 mysqladmin -u root -p status

我明白了:

connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists! 

但是当我这样做时:ps aux | grep mysql我得到了一个合适的PID和运行它的用户。

为什么在第一种情况下会出错?

0 个答案:

没有答案