###### 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. 内核中的xenfs是什么?

    答: 是一个xen虚拟机高性能搜索文件系统,它基于共享内存通信协议和共享缓冲区缓存.

  2. Linux配置ssh服务和XShell连接Linux

    SSH服务查看和安装,配置: https://www.cnblogs.com/qiuqiuqiu/p/6445426.html https://www.cnblogs.com/yunweis/p/77 ...

  3. dfs序七个经典问题

    update-2018.07.23: 原文问题五思路描述有误,已更正. 参考自:<数据结构漫谈>-许昊然 dfs序是树在dfs先序遍历时的序列,将树形结构转化成序列问题处理. dfs有一个 ...

  4. p3168 [CQOI2015]任务查询系统(差分+主席树)

    恕我才学浅薄,一开始想到的是树状数组+线段树,然后看了题解才第一次见到了差分这种神奇的科技 仔细想想,主席树的本质不就是前缀和嘛,加上一个差分也是可以的,没想到真是罪过罪过 对时间维护一个差分 在Si ...

  5. 论文笔记:Capsules for Object Segmentation

    Capsules for Object Segmentation 2018-04-16  21:49:14 Introduction: ----

  6. (zhuan) Paper Collection of Multi-Agent Reinforcement Learning (MARL)

    this blog from: https://github.com/LantaoYu/MARL-Papers Paper Collection of Multi-Agent Reinforcemen ...

  7. 写前端页面步骤----vue+iview

    1:用iview构建基本HTML页面 2:在export default{ }中写一个data(){return:{变量:值}}全局对象,用于传递与绑定HTML参数. 3:在export defaul ...

  8. Python有趣现象(不定时更新)

    1.list中extend方法有趣现象 1.1 List+=Str 与 List.extend(Str) list1 = [11,2,45] str1 = 'Michael' list1.extend ...

  9. 测试与CMMI质量体系

    1. CMMI全称是Capability Maturity Model Integration,即能力成熟度模型集成(也有称为:软件能力成熟度集成模型) 其目的是帮助软件企业对软件工程过程进行管理和改 ...

  10. github 首页不显示提交记录

    原因,一般是因为提交登录里配置的邮箱不是 github 上记录的邮箱. 如何查询提交记录里的邮箱? 如果是本地仓库, 使用小乌龟什么的定位到要查看的提交就可以了.如果是远程仓库, 进入提交记录详情,在 ...