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 ...
随机推荐
- macOS搭建开发环境
1.包管理器Homebrew使用下面的命令安装: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/insta ...
- 排它平方数|2013年蓝桥杯A组题解析第二题-fishers
排它平方数 小明正看着 203879 这个数字发呆. 原来,203879 * 203879 = 41566646641 这有什么神奇呢?仔细观察,203879 是个6位数,并且它的每个数位上的数字都是 ...
- ZOJ 3963 Heap Partition(multiset + stl自带二分 + 贪心)题解
题意:给你n个数字s1~sn,要你把它们组成一棵棵二叉树,对这棵二叉树来说,所有节点来自S,并且父节点si<=子节点sj,并且i<j,问你树最少几棵二叉数.树 思路:贪心.我们往multi ...
- AT2442 フェーン現象 (Foehn Phenomena)
题目地址 原题地址 题解 其实就是一个区间加,单点查询的问题 当然可以线段树/树状数组做,但是这两个做法要分类讨论所以代码会比较多 我们考虑一种更简便的做法 差分! 因为温度只和海拔差有关,这相当于题 ...
- 论文笔记:Semantic Segmentation using Adversarial Networks
Semantic Segmentation using Adversarial Networks 2018-04-27 09:36:48 Abstract: 对于产生式图像建模来说,对抗训练已经取得了 ...
- 论文笔记之:Heterogeneous Face Attribute Estimation: A Deep Multi-Task Learning Approach
Heterogeneous Face Attribute Estimation: A Deep Multi-Task Learning Approach 2017.11.28 Introductio ...
- Python实现机器学习算法:逻辑回归
import numpy as np import matplotlib.pyplot as plt from sklearn.datasets.samples_generator import ma ...
- .Net Core 本地化&全球化 实践
介绍: 所有有关本地化的数据获取,都是从统一的一个资源文件中获取 1.创建虚拟类.资源文件,用于作为本地化数据的获取源 2.Configure localization:支持view.data ann ...
- BMv2 simple_switch 运行时切换P4程序
参考: [P4-dev] swapping p4 program using load_new_config and swap_configs commands BMv2 运行时切换P4程序 相关演示 ...
- Lintcode452-Remove Linked List Elements-Easy
Remove Linked List Elements Remove all elements from a linked list of integers that have value val. ...