###### 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
 
# 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='';
 
问题:
bash: service: command not found
yum install initscripts -y

CentOS7 下源代码安装mysql5.6的更多相关文章

  1. Linux(CentOS7)下二进制安装MySQL5.7.26

    记录一下自己在 CentOS7 下二进制安装 MySQL5.7.26 的过程,之前使用 Linux(CentOS7)下rpm安装MySQL8.0.16 之后发现 rpm 方式安装不利于维护,也不利于单 ...

  2. CentOS7 下源代码安装apache2.4

    Apache httpd 2.4 源代码安装   https://httpd.apache.org/docs/2.4/install.html   这里选用Apache2.4版本. wget http ...

  3. centos7 下手动安装MySQL-5.6.32-1.linux_glibc2.5.x86_64.rpm-bundle

    由于centos7默认不再是mysql数据库,所以度算手动安装一个. 全程参考http://www.2cto.com/database/201501/371451.html 这里摘抄以下这个链接的内容 ...

  4. CentOS7下二进制文件安装MySQL5.6

    1.查看已装包 [root@host2 ~]# rpm -qa | grep mysql mysql-libs-5.1.71-1.el6.x86_64 [root@host2 ~]# [root@ho ...

  5. CentOS7 下源代码安装php7

    安装PHP7: php-7.1.2.tar.gz:下载:wget http://cn2.php.net/get/php-7.1.2.tar.gz/from/this/mirror 安装php: # t ...

  6. 在Centos7下源代码安装配置Nginx

    1.安装前准备开发环境安装pcre开发包:yum install -y pcre-devel 安装编译源码所需的工具和库:yum install gcc gcc-c++ ncurses-devel p ...

  7. 阿里云Centos7使用yum安装MySQL5.6的正确姿势

    阿里云Centos7使用yum安装MySQL5.6 阿里云Centos7使用yum安装MySQL5.6 前言:由于某些不可抗力,我要在自己的阿里云服务器上搭建hadoop+hive+mysql+tom ...

  8. linux 源代码安装mysql5.5

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

  9. CentOS6.5_64bit下编译安装MySQL-5.6.23

    转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/44785511 ************************************** ...

随机推荐

  1. IP/子网掩码/网关/广播地址

    判断两个IP是否处于同一子网(网段) 广播地址的作用是什么? 每天一个linux命令(52):ifconfig命令 什么是IP地址.子网掩码.路由和网关

  2. DNS 基础

    DNS Domain Name System:域名系统,主要用来将域名解析为IP.DNS以及相关系统存在,主要有两个原因: 可以让人容易记住名字,而不是记住IP: 它允许服务器改变IP,但是采用同样的 ...

  3. cf213E 线段树维护hash

    链接 https://codeforces.com/contest/213/problem/E 题目大意 给出两个排列a.b,长度分别为n.m,你需要计算有多少个x,使 得\(a_1 + x; a_2 ...

  4. 深入了解JVW

    Java内存组成介绍:堆(Heap)和非堆(Non-heap)内存 按照官方的说法:“Java 虚拟机具有一个堆,堆是运行时数据区域,所有类实例和数组的内存均从此处分配.堆是在 Java 虚拟机启动时 ...

  5. C# 递归模型定义。赋值

    https://blog.csdn.net/wumiju/article/details/80429412 public partial class ProductTypeModel:DbEntity ...

  6. (转)Awesome GAN for Medical Imaging

    Awesome GAN for Medical Imaging 2018-08-10 09:32:43 This blog is copied from: https://github.com/xin ...

  7. Bytom猜谜合约使用指南

    准备工作: 1.安装全节点钱包V1.0.5以上并同步完成: 2.已经发行一种资产,发行资产的方法具体见文章<如何在Bytom上发布资产?> 3.准备好一些BTM作为手续费: 设置谜语(锁定 ...

  8. 转入Python3.5

    Future 我决定从python2.7转到python3.5,毕竟python3才是未来,业余程序员也是有追求的 嵌入发布 版本3.5中的新特性.可以将python嵌入用户程序,变成程序的一部分,随 ...

  9. 19. --mus-- 音乐,娱乐(词20)

  10. Go 灵活多变的切片Slice

    我们知道数组定义好之后其长度就无法再修改,但是,在实际开发过程中,有时候我们并不知道需要多大的数组,我们期望数组的长度是可变的, 在 Go 中有一种数据结构切片(Slice) 解决了这个问题,它是可变 ...