首页 / MYSQL / Mysql 5.7.17 编译安装
Mysql 5.7.17 编译安装
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Mysql 5.7.17 编译安装,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3588字,纯文字阅读大概需要6分钟。
内容图文
![Mysql 5.7.17 编译安装](/upload/InfoBanner/zyjiaocheng/476/1db69873c8364ad5abfaa02fec056eb0.jpg)
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:455 (INCLUDE)
-- Configuring incomplete, errors occurred!
编译报错!!!!!
从标出的红色部分可以看出是缺少依赖google一番后 找到解决方案
mysql5.7.5以后都需要 boost
下载地址:https://sourceforge.net/projects/boost/files/boost/1.59.0/
安装boost:
[root@web_1 mysql-5.7.17]# tar -xf boost_1_59_0.tar.gz
[root@web_1 mysql-5.7.17]# cd boost_1_59_0/
[root@web_1 mysql-5.7.17]# mkdir /usr/local/boost
[root@web_1 mysql-5.7.17]# cp -a ./* /usr/local/boost/
再次编译(指定boost路径):
#增加了boost路径 -DWITH_BOOST
[root@web_1 mysql-5.7.17]# cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/data/3307/data \ #自定义目录
-DSYSCONFDIR=/data/3307 \ #自定义目录
-DMYSQL_USER=mysql \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_MEMORY_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DMYSQL_UNIX_ADDR=/data/3307/mysql.sock \ #自定义目录
-DMYSQL_TCP_PORT=3307 \ #自定义端口
-DENABLED_LOCAL_INFILE=1 \
-DENABLE_DOWNLOADS=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DEXTRA_CHARSETS=all \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_DEBUG=0 \
-DMYSQL_MAINTAINER_MODE=0 \
-DWITH_SSL:STRING=bundled \
-DWITH_ZLIB:STRING=bundled \
-DWITH_BOOST=/usr/local/boost
[root@web_1 mysql-5.7.17]# make && make install
make过程中报以下错误!!!
[ 75%] Built target sqlgunitlib
[ 75%] Building CXX object unittest/gunit/CMakeFiles/merge_small_tests-t.dir/merge_small_tests.cc.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [unittest/gunit/CMakeFiles/merge_small_tests-t.dir/merge_small_tests.cc.o] Error 4
make[1]: *** [unittest/gunit/CMakeFiles/merge_small_tests-t.dir/all] Error 2
make: *** [all] Error 2
google一番后发现是 内存不够 swap分区也不够
解决方案:
[root@web_1 ~]# dd if=/dev/zero of=/swapfile bs=1k count=2048000
[root@web_1 ~]# mkswap /swapfile
[root@web_1 ~]# swapon /swapfile
初始化:
[root@web_1 3307]# mysqld --defaults-file=/data/3307/my.cnf --initialize-insecure --user=mysql
启动服务:
[root@web_1 3307]# mysqld_safe --user=mysql &
[root@web_1 data]# mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.17-log Source distribution
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
mysql>
安装完成!
本文出自 “梦1场ー〉╯” 博客,请务必保留此出处http://cqwujiang.blog.51cto.com/10808946/1900875
Mysql 5.7.17 编译安装
标签:mysql 5.7.17 编译安装
本文系统来源:http://cqwujiang.blog.51cto.com/10808946/1900875
内容总结
以上是互联网集市为您收集整理的Mysql 5.7.17 编译安装全部内容,希望文章能够帮你解决Mysql 5.7.17 编译安装所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。