###### 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的更多相关文章

  1. 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 ...

  2. CentOS-6.4-minimal版中源代码安装MySQL-5.5.38

    完整版见https://jadyer.github.io/2014/09/29/centos-install-mysql/ /** * CentOS-6.4-minimal版中源代码安装MySQL-5 ...

  3. CentOS 7 源代码安装Nginx

    本篇简要介绍CentOS 7 源代码安装Nginx. Preface # yum install epel-release -y # yum group install "Developme ...

  4. Centos 7.6 安装Mysql5.7(离线)

    Centos 7.6 安装Mysql5.7(离线) 标签(空格分隔): mysql 安装包下载 https://dev.mysql.com/downloads/mysql/ [image.png-14 ...

  5. centos下编译安装mysql5.6

    CentOS 6.4下编译安装MySQL 5.6.14 参考:http://www.cnblogs.com/xiongpq/p/3384681.html 概述: CentOS 6.4下通过yum安装的 ...

  6. linux 源代码安装mysql5.5

    linux下源代码安装mysql过程例如以下: yum update yum upgrade yum install -y vim man wget yum install -y gcc gcc-c+ ...

  7. centos下编译安装mysql5.5/5.6

    2013年11月16日 19:39:13 centos 6 mysql 5.5.28 我只说些我出错的地方: cmake后删除的方法是 xargs rm < install_manifest.t ...

  8. CentOS 6.5 安装MySQL5.7 RPM

    一.新特性 MySQL 5.7可谓是一个令人激动的里程碑,在默认了InnoDB引擎的基础上,新增了ssl.json.虚拟列等新特性.相对于postgreSQL和MariaDB而言,MySQL5.7做了 ...

  9. centos下编译安装mysql5.5/5.6/5.7

    2018-12-28 14:38:46 星期五 centos 系统在mysql官网, 按照教程去配置yum源, 然后安装, 不用自己找依赖了: https://dev.mysql.com/doc/my ...

随机推荐

  1. Ground Defense【不知道叫啥可能就是枚举】

    问题 G: Ground Defense 时间限制: 1 Sec  内存限制: 128 MB 提交: 116  解决: 22 [提交] [状态] [命题人:admin] 题目描述 You are a ...

  2. ZOJ 3609 Modular Inverse(扩展欧几里得)题解

    题意:求乘法逆元最小正正数解 思路:a*x≡1(mod m),则称x 是 a 关于 m 的乘法逆元,可以通过解a*x + m*y = 1解得x.那么通过EXGcd得到特解x1,最小正解x1 = x1 ...

  3. [转] J2EE基础知识

    Servlet总结 阐述Servlet和CGI的区别? CGI的不足之处: Servlet的优点: Servlet接口中有哪些方法及Servlet生命周期探秘 get和post请求的区别 什么情况下调 ...

  4. Linux/shell: Concatenate multiple lines to one line

    $ cat file START Unix Linux START Solaris Aix SCO 1. Join the lines following the pattern START with ...

  5. synchronized 关键字如何使用

    http://blog.csdn.net/shenshibaoma/article/details/53009505 http://www.importnew.com/20444.html 锁一般分为 ...

  6. Visual Question Answering with Memory-Augmented Networks

    Visual Question Answering with Memory-Augmented Networks 2018-05-15 20:15:03 Motivation: 虽然 VQA 已经取得 ...

  7. 论文笔记之:SeqGAN: Sequence generative adversarial nets with policy gradient

    SeqGAN: Sequence generative adversarial nets with policy gradient  AAAI-2017 Introduction :  产生序列模拟数 ...

  8. qt QRegExp使用(搬运工)

    设置正则表达式. 类似下面的 QRegExp 这里的用法就是用来检测QString等字符串错误的,例如文件名里面最好就不出现<>|/\:等,所以可以如下定义QRegExp rx(" ...

  9. Katana的WebAPI集成Swagger 解决方案

    这位大哥写的博客很清楚了,我就不重复了. http://www.cnblogs.com/caodaiming/p/4156476.html 错误解决 http://blog.csdn.net/gold ...

  10. Bootstrap 3 媒体查询

    可以参考 Bootstrap  的媒体查询,写网站. html: <div class="bootstrap-3-media"> <p>Mobile-Fir ...