无法停止 MySQL 服务(正在运行但未找到)

无法停止 MySQL 服务(正在运行但未找到)

我在 docker 中运行 MySQL 服务器FROM ubuntu/mysql:8.0-22.04_beta

我正在尝试停止该服务

$> /etc/init.d/mysql stop
bash: /etc/init.d/mysql: No such file or directory

$> service stop mysqld
stop: unrecognized service

$> service stop mysql 
stop: unrecognized service

$> systemctl stop mysqld
ERROR:systemctl:Unit mysqld.service could not be found.

$> systemctl stop mysql 
ERROR:systemctl:Unit mysql.service could not be found.

$> ps -aux | grep sql
mysql         35  0.7  1.2 2532224 419596 ?      Sl   14:11   0:01 mysqld

正确的做法是什么?

相关内容