linux下怎么停止mysql服务

首页 编程分享 DB丨SERVICE 正文

青灯夜游 转载 编程分享 2022-02-23 23:09:03

简介 linux停止mysql服务的方法:1、在终端中执行“mysqladmin -u root shutdown”命令关闭mysql服务即可;2、在终端中执行“service mysql stop”命令关闭mysql服务即可。


本教程操作环境:linux5.9.8系统、mysql8版本、Dell G3电脑。

linux下查看mysql服务的两种方式:

方式一:

[root@localhost bin]ps -ef|grep mysql

方式二:

[root@localhost bin]netstat -nlp

linux下关闭停止mysql服务的两种方式:

命令行方式:

[root@localhost ~]mysqladmin -u root shutdown

服务方式:

[root@localhost ~]service mysql stop

linux下启动mysql服务的两种方式:

命令行方式:

[root@localhost bin]cd /usr/bin
[root@localhost bin]./mysqld_safe &

服务方式:

[root@localhost ~]service mysql start
如果服务在启动状态,直接重启服务用以下命令:
[root@localhost ~]service mysql restart

【相关推荐:】

以上就是linux下怎么停止mysql服务的详细内容,更多请关注php中文网其它相关文章!

转载链接:http://www.php.cn//mysql-tutorials-489101.html


Tags:


本篇评论 —— 揽流光,涤眉霜,清露烈酒一口话苍茫。


    声明:参照站内规则,不文明言论将会删除,谢谢合作。


      最新评论




ABOUT ME

Blogger:袅袅牧童 | Arkin

Ido:PHP攻城狮

WeChat:nnmutong

Email:nnmutong@icloud.com

标签云