mysqld状态显示已停止,但它实际运行

时间:2018-05-02 12:47:55

标签: mysql centos6

我使用的是CentOS6 Hortonworks Sandbox。 我跑的时候:

[root@sandbox-hdp ~]# service mysqld stop

它停了,我检查了:

[root@sandbox-hdp ~]# service mysqld status
mysqld is stopped

到目前为止,一切都很好。但是,当我试图从这开始:

[root@sandbox-hdp ~]# service mysqld start
Starting mysqld:                                           [  OK  ]

我再次检查:

[root@sandbox-hdp ~]# service mysqld status
mysqld is stopped

但现在发生了奇怪的事情:

[root@sandbox-hdp ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5486
Server version: 5.6.39 MySQL Community Server (GPL)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

我不明白这是怎么发生的?

1 个答案:

答案 0 :(得分:0)

我解决了。我学习了mysqld pid:

top

然后杀了它

kill 24678

我开始使用mysqld:

service start mysqld

问题是:

service mysqld stop

无法阻止mysqld。