本文实例为大家分享了Linux mysql5.7.13安装教程,供大家参考,具体内容如下

1、准备
cmake-3.6.0.tar.gz 
bison-3.0.4.tar.gz 
mysql-5.7.13.tar.gz (http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13.tar.gz) 

2、安装cmake 和 bison
首先可以查看下是否安装了 cmake 

# rpm -qa |grep cmake 
# tar zxvf cmake-3.6.0.tar.gz
# cd cmake-3.6.0
# ./bootstrap
# make && make install 
# tar zxvf bison-3.0.4.tar.gz
# cd bison-3.0.4
# ./configure
# make && make install 

3、安装Mysql 

[root@localhost src]# tar -zxvf mysql-5.7.13.tar.gz
[root@localhost src]# cd mysql-5.7.13
[root@localhost mysql-5.7.13]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_chinese_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/data/mysqldb -DMYSQL_TCP_PORT=3306 -DENABLE_DOWNLOADS=1 


...
CMake Error at cmake/boost.cmake:81 (MESSAGE):
 You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory>

 This CMake script will look for boost in <directory>. If it is not there,
 it will download and unpack it (in that directory) for you.

 If you are inside a firewall, you may need to use an http proxy:

 export http_proxy=http://example.com:80

Call Stack (most recent call first):
 cmake/boost.cmake:238 (COULD_NOT_FIND_BOOST)
 CMakeLists.txt:451 (INCLUDE)

-- Configuring incomplete, errors occurred!

Linux环境下mysql5.7.13安装教程 

注:重新运行配置,需要删除CMakeCache.txt文件 
解决: 
(1)在预编译时添加相应的选项:cmake -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost 
(2)或者下载一个boost包,放到/usr/local/boost目录下,然后在cmake后面加选项-DWITH_BOOST=/usr/local/boost

[root@localhost mysql-5.7.13]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_chinese_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/data/mysqldb -DMYSQL_TCP_PORT=3306 -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost

 .... 
 CMake Error at cmake/readline.cmake:64 (MESSAGE):
 Curses library not found. Please install appropriate package,

 remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
 Call Stack (most recent call first):
 cmake/readline.cmake:107 (FIND_CURSES)
 cmake/readline.cmake:181 (MYSQL_USE_BUNDLED_EDITLINE)
 CMakeLists.txt:479 (MYSQL_CHECK_EDITLINE)


 -- Configuring incomplete, errors occurred!
 See also "/usr/local/src/mysql-5.7.13/CMakeFiles/CMakeOutput.log".
 See also "/usr/local/src/mysql-5.7.13/CMakeFiles/CMakeError.log".

  解决: 
(1)安装ncurses-devel 
yum -y install ncurses-devel
(2)删除CMakeCache.txt 
rm CMakeCache.txt
(3)重新cmake 
复制代码 代码如下:[root@localhost mysql-5.7.13]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=mysql.mysql -DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_chinese_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/data/mysqldb -DMYSQL_TCP_PORT=3306 -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost  

复制代码 代码如下:[root@localhost mysql-5.7.13]# make[root@localhost mysql-5.7.13]# make install

精彩专题分享:mysql不同版本安装教程 mysql5.7各版本安装教程

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

标签:
Linux,mysql5.7.13

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
白云城资源网 Copyright www.dyhadc.com

评论“Linux环境下mysql5.7.13安装教程”

暂无“Linux环境下mysql5.7.13安装教程”评论...

稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!

昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。

这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。

而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?