用户登录
用户注册

分享至

linux下mysql启动和关闭

  • 作者: 陈羏六点三十
  • 来源: 51数据库
  • 2020-08-12

一、停止

# mysqladmin -r root -p123456 shutdown 

其中用户是root,密码是123456 

二、启动

假设我们不知是启动还是停止 

先查看状态:# /etc/rc.d/init.d/mysql status 

如果显示[FAILED]说明是停止的 

我们来启动:#service mysql start 

三、自动启动

  1)察看mysql是否在自动启动列表中
  [root@test1 local]# /sbin/chkconfig –list
  2)把MySQL添加到你系统的启动服务组里面去
  [root@test1 local]# /sbin/chkconfig – add mysql
  3)把MySQL从启动服务组里面删除。
  [root@test1 local]# /sbin/chkconfig – del mysql



软件
前端设计
程序设计
Java相关