contos7安装mysql-5.7.28源代码

Posted 大柏树

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了contos7安装mysql-5.7.28源代码相关的知识,希望对你有一定的参考价值。

contos7安装mysql-5.7.28源代码

首先查看支持的版本:https://www.mysql.com/support/supportedplatforms/database.html

 

(mysql-5.7.28.tar.gz)
(mysql-boost-5.7.28.tar.gz)
第一种没有boost,需要自己安装。 mysql5.7之后boost-1.19是必须的。

二.安装之前的准备

2.1.卸载自带的mysql

rpm -qa | grep mysql
有的话卸载
rpm -e --nodepes ...

检测系统是否自带mariadb
rpm -qa | grep mariadb

2.2.cmake

which is used as the build framework on all platforms. CMake can be downloaded from http://www.cmake.org.

2.3.安装boost

tar zxvf boost_1_59_0.tar.gz
cd boost_1_59_0
./bootstrap.sh --prefix=/usr/local/boost
./b2 install
打开/etc/profile,添加以下内容:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/boost/lib
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/boost/lib
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/boost/include
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/boost/include

source /etc/profile

 

# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> mkdir bld
shell> cd bld
shell> cmake ..
shell> make
shell> make install
# End of source-build specific instructions
# Postinstallation setup
shell> cd /usr/local/mysql
shell> mkdir mysql-files
shell> chown mysql:mysql mysql-files
shell> chmod 750 mysql-files
shell> bin/mysqld --initialize --user=mysql
shell> bin/mysql_ssl_rsa_setup
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server

 chkconfig --add mysql

 

mysqladmin variables

mysqladmin -h host_name variables

以上是关于contos7安装mysql-5.7.28源代码的主要内容,如果未能解决你的问题,请参考以下文章

centos7安装mysql-5.7.28

win10 安装 MySQL-5.7.28 记录

Centos7 mysql 5.7.28源码安装

Windows下mysql-5.7.28下载安装配置教程

win10安装mysql-5.7.28-winx64(压缩包版)

MySQL mysql-5.7.28-winx64 win7 64位zip版本安装