作者:Eminem被注册了 | 来源:互联网 | 2023-07-02 19:06
【1】ps-ef|grepmysqld看看是否有mysqld_safe和mysqld进程[rootlocalhost~]#ps-ef|grepmysqld显示结果:
【1】ps -ef|grep mysqld 看看是否有mysqld_safe 和mysqld进程
[root@localhost ~]# ps -ef|grep mysqld
显示结果:
1)root 4052 29869 0 10:25 pts/0 00:00:00 grep mysqld
2)root 30905 1 0 10:14 pts/0 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/localhost.localdomain.pid
3)mysql 31231 30905 1 10:14 pts/0 00:00:09 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/localhost.localdomain.err --pid-file=/usr/local/mysql/data/localhost.localdomain.pid --socket=/tmp/mysqld.sock --port=3306
【2】如果已添加到系统服务中,可以service mysqld status
[root@localhost ~]# service mysqld status
显示结果:SUCCESS! MySQL running (31231)