1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > CentOS 7.1上使用Systemd管理编译安装的MySQL 5.6

CentOS 7.1上使用Systemd管理编译安装的MySQL 5.6

时间:2019-05-16 04:47:21

相关推荐

CentOS 7.1上使用Systemd管理编译安装的MySQL 5.6

数据库|mysql教程

CentOS编译安装MySQL,CentOS 7.1上使用S

数据库-mysql教程

励志源码,vscode无法识别中文字,ubuntu网连不上,tomcat需要配合iis,海里小爬虫,php显示500错误,巢湖seo网络推广哪里靠谱lzw

CentOS 7.1默认yum没有MySQL 5.6,稳健的方法是使用MySQL官网提供的源码自行编译安装。但是编译安装的MySQL 5.6的启动管理是基于

ssm项目源码 百度网盘,ubuntu登录客人会话,图片替换字体 爬虫,php geometry,seo国外前景lzw

微信二维码导航源码,ubuntu安装w,百度配置tomcat,爬虫学家 英语,php表单验证手机号,seo网络推广怎么做秒收录lzw

CentOS 7.1默认yum没有MySQL 5.6,稳健的方法是使用MySQL官网提供的源码自行编译安装。但是编译安装的MySQL 5.6的启动管理是基于CentOS 6.x的service管理方式,不是CentOS 7.x的Systemd的管理方式。MySQL为RHEL和CentOS提供了的MySQL 5.6的yum源,使用yum安装的MySQL是自带Systemd管理脚本文件的。

那么,如何用Systemd管理编译安装的MySQL呢?

首先看看yum安装的MySQL提供的Systemd管理脚本

$ cat /usr/lib/systemd/system/mysqld.service

#

# Simple MySQL systemd service file

#

# systemd supports lots of fancy features, look here (and linked docs) for a full list:

#

#

# Note: this file ( /usr/lib/systemd/system/mysql.service )

# will be overwritten on package upgrade, please copy the file to

#

# /etc/systemd/system/mysql.service

#

# to make needed changes.

#

# systemd-delta can be used to check differences between the two mysql.service files.

#

[Unit]

Description=MySQL Community Server

After=network.target

After=syslog.target

[Install]

WantedBy=multi-user.target

Alias=mysql.service

[Service]

User=mysql

Group=mysql

# Execute pre and post scripts as root

PermissionsStartOnly=true

# Needed to create system tables etc.

ExecStartPre=/usr/bin/mysql-systemd-start pre

# Start main service

ExecStart=/usr/bin/mysqld_safe

# Don’t signal startup success before a ping works

ExecStartPost=/usr/bin/mysql-systemd-start post

# Give up if ping don’t get an answer

TimeoutSec=600

Restart=always

PrivateTmp=false

最后应该是这个样子

#

# Simple MySQL systemd service file

#

# systemd supports lots of fancy features, look here (and linked docs) for a full list:

#

#

# Note: this file ( /usr/lib/systemd/system/mysql.service )

# will be overwritten on package upgrade, please copy the file to

#

# /etc/systemd/system/mysql.service

#

# to make needed changes.

#

# systemd-delta can be used to check differences between the two mysql.service files.

#

[Unit]

Description=MySQL Community Server

After=network.target

After=syslog.target

[Install]

WantedBy=multi-user.target

Alias=mysql.service

[Service]

User=mysql

Group=mysql

# Execute pre and post scripts as root

PermissionsStartOnly=true

# Needed to create system tables etc.

#ExecStartPre=/usr/bin/mysql-systemd-start pre

# Start main service

ExecStart=/usr/local/mysql/bin/mysqld_safe

# Don’t signal startup success before a ping works

#ExecStartPost=/usr/bin/mysql-systemd-start post

# Give up if ping don’t get an answer

TimeoutSec=600

Restart=always

PrivateTmp=false

————————————–分割线 ————————————–

Ubuntu 14.04下安装MySQL

《MySQL权威指南(原书第2版)》清晰中文扫描版 PDF

Ubuntu 14.04 LTS 安装 LNMP Nginx\PHP5 (PHP-FPM)\MySQL

Ubuntu 14.04下搭建MySQL主从服务器

Ubuntu 12.04 LTS 构建高可用分布式 MySQL 集群

Ubuntu 12.04下源代码安装MySQL5.6以及Python-MySQLdb

MySQL-5.5.38通用二进制安装

————————————–分割线 ————————————–

本文永久更新链接地址:

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。