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 ...
随机推荐
- try finally 执行顺序问题
有return的情况下try catch finally的执行顺序 在遇到Exception 并且没有catch的情况下finally语句块没有执行 System.exit(0),终止了 Java 虚 ...
- P3412 仓鼠找sugar II
思路 挺神的概率期望.. 好吧是我太弱了,完全没有往那里想 注意期望是具有线性性的,一条路径的期望可以变成每条边的期望求和 概率是某件事发生的可能性,期望是某件事确定发生的代价 首先没有终点的条件并不 ...
- 如何创建并运行java线程 , 多线程使用
http://www.importnew.com/20672.html https://www.cnblogs.com/wxd0108/p/5479442.html https://www.cnblo ...
- [HDU] 平方和与立方和
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2007 //坑:注意判断输入两个数的前后大小关系 // 用while 循环 #include<io ...
- call继承父级属性,prototype继承父级方法
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- JavaScript 拥有动态类型
字符串.数字.布尔.数组.对象.Null.Undefined JavaScript 拥有动态类型 JavaScript 拥有动态类型.这意味着相同的变量可用作不同的类型: 实例 var x // x ...
- 模块、包及常用模块(time/random/os/sys/shutil)
一.模块 模块的本质就是一个.py 文件. 导入和调用模块: import module from module import xx from module.xx.xx import xx as re ...
- Linux命令之nl命令
nl 命令在 Linux 系统中用来计算文件中行号.nl 可以将输出的文件内容自动的加上行号,其默认的结果和 与 cat -n 有点不太一样,nl 可以将行号做比较多的显示设计,包括位数是否自动补齐 ...
- 2. mysql 语句
基础语句 创建表 DROP TABLE IF EXISTS student;CREATE TABLE student ( id ) NOT NULL AUTO_INCREMENT, sname ) N ...
- SVN的常用功能使用教程
(一)导入项目到版本库中 1. 在SVN服务器的仓库中新建项目名称文件夹 2. 选择安装Visual SVN的本地计算机中的一个文件夹,右键选择导入,将本地项目导入到SVN服务中央仓库中 3. 输入在 ...