当前位置:   article > 正文

ubuntu启动、停止、查看mysql服务_ubuntu怎么知道mysql是否运行

ubuntu怎么知道mysql是否运行

 停止

  1. [root@iZ0jl7qrrrig03ubmi06kwZ ~]# sudo service mysqld stop
  2. Redirecting to /bin/systemctl stop mysqld.service

启动 

  1. [root@iZ0jl7qrrrig03ubmi06kwZ ~]# sudo service mysqld start
  2. Redirecting to /bin/systemctl start mysqld.service

查看状态

  1. [root@iZ0jl7qrrrig03ubmi06kwZ ~]# sudo service mysqld status
  2. Redirecting to /bin/systemctl status mysqld.service
  3. ● mysqld.service - MySQL Server
  4. Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
  5. Active: active (running) since Sun 2022-01-30 22:11:59 CST; 12s ago
  6. Docs: man:mysqld(8)
  7. http://dev.mysql.com/doc/refman/en/using-systemd.html
  8. Process: 10504 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
  9. Main PID: 10528 (mysqld)
  10. Status: "Server is operational"
  11. CGroup: /system.slice/mysqld.service
  12. └─10528 /usr/sbin/mysqld
  13. Jan 30 22:11:58 iZ0jl7qrrrig03ubmi06kwZ systemd[1]: Starting MySQL Server...
  14. Jan 30 22:11:59 iZ0jl7qrrrig03ubmi06kwZ systemd[1]: Started MySQL Server.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/187917
推荐阅读
相关标签
  

闽ICP备14008679号