发布网友 发布时间:2022-04-23 01:26
共1个回答
热心网友 时间:2022-05-05 04:21
【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)