但行好事
莫论前程❤

MySQL数据库系列(1)—Mysql服务管理

RedHat 6.4 (Fedora Core / CentOS)操作系统,mysql: 5.6.39中:

  • 使用 mysqld 脚本启动:
 [root@liupenggc ~]#   sudo /etc/init.d/mysqld start/stop/restart/status

mysqld (pid 14037) is running…

  • 使用 service 启动:
 [hadoop@liupenggc ~]#     service mysqld start/stop/restart

报错:mysqld status unknown due to insufficient privileges.
原因: 权限不足

 [hadoop@liupenggc ~]#   sudo service mysqld start/stop/restart

Debian / Ubuntu16.04操作系统, mysql: 5.7.21中:

  • 使用 mysqld 脚本启动:
 [ubuntu@liupenggc ~]#     /etc/init.d/mysql status/start/stop/restart
  • 使用 service 启动
[ubuntu@liupenggc ~]#     service mysql status/start/stop/status

● mysql.service – MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2018-04-24 17:03:06 CST; 1 months 7 days ago
Main PID: 1089 (mysqld)
Tasks: 35
Memory: 285.1M
CPU: 24min 35.012s
CGroup: /system.slice/mysql.service
└─1089 /usr/sbin/mysqld
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

mysqld 和 mysql的区别

  • mysqld是关于服务器端的程序
  • mysql是mysql自带的客户端程序,一般用在cmd或者终端下.

Windows10操作系统,mysql: 5.5.15中

 C:\Users\liupenggc.FEINNO> net start/stop mysql

windows系统下不可以直接restart

赞(3) 打赏
未经允许不得转载:刘鹏博客 » MySQL数据库系列(1)—Mysql服务管理
分享到: 更多 (0)

评论 5

评论前必须登录!

 

  1. #4

    Hello, after reading this amazing paragraph i am too glad to share my experience here with colleagues.

    viagra

    viagra5个月前 (03-09)
  2. #3

    Wonderful post! We will be linking to this great article on our site.

    Keep up the good writing.

  3. #2

    Thankfulness to my father who told me regarding this website, this website is actually awesome.

  4. 嗯嗯 晓得啦 我改一下

    liupeng1年前 (2018-06-01)
  5. #1

    Linux说的有些太笼统了,最好指定发行版~ 比如RHEL? CentOS? Ubuntu? debian?

    Mr.Li1年前 (2018-05-31)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏