我正在尝试查看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和运行它的用户。
为什么在第一种情况下会出错?