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

egdjgwm8  于 2021-06-21  发布在  Mysql
关注(0)|答案(1)|浏览(333)

我使用centos6 hortonworks沙盒。当我跑步时:

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

它停了,我检查了一下:

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

到目前为止一切都很好。但当我试着从这个开始时:

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

我又查了一遍:

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

但奇怪的事情正在发生:

  1. [root@sandbox-hdp ~]# mysql -u root -p
  2. Enter password:
  3. Welcome to the MySQL monitor. Commands end with ; or \g.
  4. Your MySQL connection id is 5486
  5. Server version: 5.6.39 MySQL Community Server (GPL)
  6. Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  7. Oracle is a registered trademark of Oracle Corporation and/or its
  8. affiliates. Other names may be trademarks of their respective
  9. owners.
  10. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  11. mysql>

我不明白怎么会这样?

xsuvu9jc

xsuvu9jc1#

​我解决了。我学习mysqld pid的方法是:

  1. top

​然后杀了它

  1. kill 24678

​我开始了mysqld:

  1. service start mysqld

问题是:

  1. service mysqld stop

​无法阻止mysqld。

展开查看全部

相关问题