###### 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. 如何使用thinkphp的model来验证前端表单?

    为了增加安全性, 在向model表中写入和修改数据时, 最好是调用 create方法来保证安全, 然后再调用add和save方法: if($Model->Validate($validate)- ...

  2. 大明A+B(大数相加)解题报告

    Problem Description 话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫"大明". 这时他已经不是那个只会做100以内加法的那个"小明 ...

  3. How to check if one path is a child of another path?

    How to check if one path is a child of another path? Unfortunately it's not as simple as StartsWith. ...

  4. sublime使用技巧总结

    软件右下角可以选择文档语法模式 Ctrl + Shift + P ------------------命令模式sshtml模糊匹配-----语法切换到html模式,同理所得,ss+相应文件名匹配相应模 ...

  5. Shiro学习笔记四(Shiro集成WEB)

    这两天由于家里出了点事情,没有准时的进行学习.今天补上之前的笔记 -----没有学不会的技术,只有不停找借口的人 学习到的知识点: 1.Shiro 集成WEB 2.基于角色的权限控制 3.基于权限的控 ...

  6. [转载]Linux中的网络接口及LO回环接口

    转自:https://blog.csdn.net/weixin_39863747/article/details/80564358 Linux中的网络接口及LO回环接口 2018年06月04日 10: ...

  7. 6、nginx的反向代理及缓存功能

    nginx模块的应用 ngx_http_proxy_module  nginx 反向代理模块: http://nginx.org/en/docs/http/ngx_http_proxy_module. ...

  8. jsTree使用

    引用:jsTreede css 与Js 初始化jsTree: //加载树 function initTree(treeData) { $.jstree.destroy(); $('#treeDiv') ...

  9. Navicat for MySQL用ssh功能连接远程数据库

    转载自:http://holy2010.blog.51cto.com/1086044/518431 实现用本地的ssh隧道起到加密功能 在windows平台上运行Navicat for MySQL(h ...

  10. hibernate的三种状态和缓存

    hibernate的三种状态: 1.瞬时态:对象里面没有id值,对象与session没有关联 类似,把class类new出来,不存进session 2.持久态:对象里面有id值,对象与session关 ...