###### 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. [HEOI2016/TJOI2016]树

    [HEOI2016/TJOI2016]树 思路 做的时候也是糊里糊涂的 就是求最大值的线段树 错误 线段树写错了 #include <bits/stdc++.h> #define FOR( ...

  2. HDU 5965 扫雷(dfs)题解

    题意:给你一个3*n的格子,中间那行表明的是周围8格(当然左右都没有)的炸弹数量,上下两行都可以放炸弹,问你有几种可能,对mod取模 思路:显然(不),当i - 1和i - 2确定时,那么i的个数一定 ...

  3. Cannot retrieve metalink for repository: epel 错误解决办法

    centos下安装完EPEL源, 然后更新一下yum缓存, 如果发现这样的错误:Error: Cannot retrieve metalink for repository: epel. Please ...

  4. C# 里调用vb的inputbox弹出窗

    https://blog.csdn.net/hutao1101175783/article/details/16800871 先对项目添加对Microsoft.VisualBasic的引用 Inter ...

  5. LOJ6285 数列分块入门9(分块)

    昨天对着代码看了一晚上 然后今天终于在loj上过了 数列分块入门9题撒花★,°:.☆( ̄▽ ̄)/$:.°★ . 然后相当玄学 块的大小调成\(\sqrt{n}\)会TLE,改成150就过了 啧 然后就 ...

  6. (转) Learning Deep Learning with Keras

    Learning Deep Learning with Keras Piotr Migdał - blog Projects Articles Publications Resume About Ph ...

  7. Python: 字典应用题

    Write a program to read through the mbox-short.txt and figure out who has sent the greatest number o ...

  8. Windows下使用命令安装Python的scipy库出错的解决

    平时使用Python都是在Sublime下使用,不想使用IDE.使用各种库时安装也就是使用pip安装即可.来说说今天自己遇到的一个问题:使用scipy数学库时,使用命令: pip install sc ...

  9. JavaScript中的方法事件和函数的方法的三种方法

    js中的很多事件  而事件相对应的就是方法(函数 )那么今天所说的就是这三种方法      已onclick事件为例 1: 基本方法 <div id="a" onclick= ...

  10. JSONObject的parseArray方法作用。

    该方法将字符串数据转换成集合对象. String dep_tree = JedisUtils.getInstance().get(CacheConstant.DEP_TREE, user.getId( ...