###### 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. Ubuntu18.04 一些好用的扩展

    原文:https://www.lulinux.com/archives/2589 一些好用的扩展: United:https://www.gnome-look.org/p/1167950/ dynam ...

  2. leetcode 04 Median of Two Sorted Arrays

    n1 为 num1的 len n2 为 num2的 len 故中间的数应该是 k = (n1 + n2 + 1) / 2 二分 num1中位置 m1 , 故 num2的位置为m2 必须保证 nums1 ...

  3. wamp phpcms部署网站问题

    服务器使用自己的服务器,域名申请后通过信息服务iis管理器建网站,并将物理地址指定到wamp的www目录中的网站的根目录.这时候如果网站首页已经生成后访问域名将进入网站首页. 出现的问题: 1.导航( ...

  4. 日系插画学习笔记(一):SAI软件基础

    检测驱动是否安装正确:1.画笔没有压感,线条没有粗细变化2.画笔线条有锯齿 一.文件:新建文件:预设尺寸:一般选择A3(8k),A4(16k),A5(32k)作业要求:A4A5 - 300dpi,像素 ...

  5. 微服务架构与实践4_Docker

    构建Docker映像 定义Dockerfile=>Docker根据Dockerfile构建出映像 包含: 基础映像(父映像)信息 维护者信息 映像操作命令 容器启动命令 .net standar ...

  6. 51Nod—1174 区间中最大的数 线段树模版

    在大佬们题解的帮助下算是看懂了线段树吧...在这mark下防一手转头就忘. #include<iostream> #include<stdio.h> using namespa ...

  7. 17秋 SDN课程 第二次上机作业

    1.控制器floodlight所示可视化图形拓扑的截图,及主机拓扑连通性检测截图 拓扑 连通性 2.利用字符界面下发流表,使得'h1'和'h2' ping 不通 流表截图 连通性 3.利用字符界面下发 ...

  8. 前端js实现 blob转base64位 和 base64位转blob

    //**dataURL to blob** function dataURLtoBlob(dataurl) { var arr = dataurl.split(','), mime = arr[0]. ...

  9. Newtonsoft.Json 去掉\r\n

    itemKindList.ToString(Newtonsoft.Json.Formatting.None)

  10. 【Ruby】【基础】

    # [Ruby 块]=begin1 块由大量代码构成2 块中代码包含在{}内3 从与其相同名称的函数调用4 可以使用yield语句调用块=enddef test p '在test方法内' yield ...