zoukankan      html  css  js  c++  java
  • Linux和windows 平台下启动和关闭mysql服务

    Linux平台下启动和关闭mysql服务

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

    方式一:

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


    方式二:

    [root@localhost bin]netstat -nlp

    二、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服务的两种方式:

    命令行方式:

    [root@localhost ~]mysqladmin -u root shutdown

    服务方式:

    [root@localhost ~]service mysql stop

    1.Windows下

    • 启动服务
      • mysqld --console  
      • 或  net start mysql  
    • 关闭服务
      • mysqladmin -uroot shudown  
      • 或  net stop mysql  
     
     
  • 相关阅读:
    饿了么 PostgreSQL 优化之旅
    kubernetes 滚动更新发布及回滚
    kubernetes yaml
    mongodb安装
    node.js安装
    linux输出换行
    把token放入请求头
    $.ajaxSetup
    js前端读取文件内容
    v-echarts安装
  • 原文地址:https://www.cnblogs.com/shelly01-zhou/p/8916653.html
Copyright © 2011-2022 走看看