centos 7 源代码安装mysql5.6
###### mysql #########
引言:这里选用mysql5.6版本,5.7版本编译时间需要几个小时。
编译安装环境:
yum -y install make gcc-c++ cmake bison-devel ncurses-devel gcc\
autoconf automake zlib* fiex* libxml* libmcrypt* libtool-ltdl-devel*
下载mysql5.6
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.16.tar.gz
# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
# Beginning of source-build specific instructions
shell> tar xvf mysql-5.6.16.tar.gz
shell> cd mysql-5.6.16
shell> mkdir bld
shell> cd bld
shell> cmake ..
若出错
make clean
rm -f CMakeCache.txt
看到最后输出:Build files have been written to:xxxxxxx证明编译成功
shell> make
shell> make install
# End of source-build specific instructions
# Postinstallation setup
shell> cd /usr/local/mysql
shell> chown -R mysql:mysql .
# Create the MySQL Server grant tables
shell> scripts/mysql_install_db --user=mysql
# Change back the owner and group of /usr/local/mysql/ directory and it’s contents to root
shell> chown -R root .
# Change the owner of /usr/local/mysql/ directory to mysql.
shell> chown -R mysql data
# Remove the permissions for group and others on /usr/local/mysql/data/ directory. So that only
mysql will have access to it.
shell> chmod -R go-rwx data
# Setting the configuration file
shell> cp support-files/my-default.cnf /etc/my.cnf
# set MySQL Server to run as the standard user mysql,[mysqld] section add a new line as shown
below.
user = mysql
character-set-server = utf8
# Initializing the MySQL Server grant tables.
shell> bin/mysqld_safe --user=mysql &
# Setting the MySQL Server service
shell> cp -v support-files/mysql.server /etc/init.d/mysql
# Add mysql as a Sys V init service.
shell> chkconfig --add mysql
# start the mysql service
shell> service mysql start
# $PATH
vim /etc/profile
PATH=
$PATH:/usr/local/php71/bin:/usr/local/php71/sbin:/usr/local/apache24/bin:/usr/local/nginx/sbin:
/usr/local/redis4/bin:/usr/local/mysql/bin
export PATH
select user,host,password from mysql.user;
set password = password('root');
delete from mysql.user where password='';
参考文档:
http://howtolamp.com/lamp/mysql/5.6/installing/
https://itbilu.com/database/mysql/VJVOut01M.html
https://www.linuxidc.com/Linux/2017-10/148100.htm
centos 7 源代码安装mysql5.6的更多相关文章
- Centos 6.4 安装mysql-5.6.14-linux-glibc2.5-i686.tar.gz
创建用户和组 创建链接 授权own和grp给mysql-5.5.8-linux2.6-i686文件夹,就是下面的BASE_DIR 执行的mysql_install_db的时候后面带参数 ./scrip ...
- CentOS-6.4-minimal版中源代码安装MySQL-5.5.38
完整版见https://jadyer.github.io/2014/09/29/centos-install-mysql/ /** * CentOS-6.4-minimal版中源代码安装MySQL-5 ...
- CentOS 7 源代码安装Nginx
本篇简要介绍CentOS 7 源代码安装Nginx. Preface # yum install epel-release -y # yum group install "Developme ...
- Centos 7.6 安装Mysql5.7(离线)
Centos 7.6 安装Mysql5.7(离线) 标签(空格分隔): mysql 安装包下载 https://dev.mysql.com/downloads/mysql/ [image.png-14 ...
- centos下编译安装mysql5.6
CentOS 6.4下编译安装MySQL 5.6.14 参考:http://www.cnblogs.com/xiongpq/p/3384681.html 概述: CentOS 6.4下通过yum安装的 ...
- linux 源代码安装mysql5.5
linux下源代码安装mysql过程例如以下: yum update yum upgrade yum install -y vim man wget yum install -y gcc gcc-c+ ...
- centos下编译安装mysql5.5/5.6
2013年11月16日 19:39:13 centos 6 mysql 5.5.28 我只说些我出错的地方: cmake后删除的方法是 xargs rm < install_manifest.t ...
- CentOS 6.5 安装MySQL5.7 RPM
一.新特性 MySQL 5.7可谓是一个令人激动的里程碑,在默认了InnoDB引擎的基础上,新增了ssl.json.虚拟列等新特性.相对于postgreSQL和MariaDB而言,MySQL5.7做了 ...
- centos下编译安装mysql5.5/5.6/5.7
2018-12-28 14:38:46 星期五 centos 系统在mysql官网, 按照教程去配置yum源, 然后安装, 不用自己找依赖了: https://dev.mysql.com/doc/my ...
随机推荐
- bsgs整理
目录 bsgs问题 或 poj2417: 概述 代码 exbsgs 鸣谢 \(gzy gzy gzy\) bsgs问题 或 poj2417: 给定质数\(p\),给定\(a\),\(b\),\((a, ...
- 思维|蚂蚁感冒|2014年蓝桥杯A组题解析第七题-fishers
标题:蚂蚁感冒 长100厘米的细长直杆子上有n只蚂蚁.它们的头有的朝左,有的朝右. 每只蚂蚁都只能沿着杆子向前爬,速度是1厘米/秒. 当两只蚂蚁碰面时,它们会同时掉头往相反的方向爬行. 这些蚂蚁中,有 ...
- android 控件获取 获取焦点
控件.setEnabled(true);控件.setFocusable(true);控件.setFocusableInTouchMode(true);控件.requestFocus();控件.requ ...
- P3975 [TJOI2015]弦论
思路 一眼SAM板子,结果敲了一中午... 我还是太弱了 题目要求求第k小的子串 我们可以把t=0当成t=1的特殊情况,(所有不同位置的相同子串算作一个就是相当于把所有子串的出现位置个数(endpos ...
- 论文笔记之:Optical Flow Estimation using a Spatial Pyramid Network
Optical Flow Estimation using a Spatial Pyramid Network spynet 本文将经典的 spatial-pyramid formulation ...
- Keepalived笔记
Keepalived高可用服务对之间的故障切换转移,是通过 VRRP (Virtual Router Redundancy Protocol ,虚拟路由器冗余协议)来实现的. VRRP的出现是为了解决 ...
- ISTQB学习笔记
学习ISTQB大纲此文记录初次阅读时不够明确的地方 第一章:软件测试基础1. 引起软件缺陷的原因人都会犯错误(error,mistake),因此人设计的代码或文档中会引入缺陷(defect, faul ...
- POJ 3279 Fliptile(翻格子)
POJ 3279 Fliptile(翻格子) Time Limit: 2000MS Memory Limit: 65536K Description - 题目描述 Farmer John kno ...
- LCA 模板
关于LCA: LCA 指树上两点的公共祖先. 如何 “暴力” 找两点的 LCA : 可以先 DFS 一遍求出每个点的 dep (深度).然后从深度大的点先往上跳,跳到与另一个点相同的深度,如果还没有到 ...
- 七牛云存储上传自有证书开启https访问
虽然七牛云存储也提供免费SSL证书申请,但我就喜欢用其他平台申请的,于是在腾讯云申请了免费SSL证书,正准备在七牛上传,弹出的界面却让我傻了眼,如下图所示: 腾讯免费SSL证书提供了不同服务器环境的版 ...