MySQL5.7源码安装问题汇总
编译安装mysql5.7版本,想试用一下新的版本特性,发现跟之前的5.6版本编译有了一些变化,总结一下避免以后继续入坑。5.6安装方式
cmake版本
5.7编译cmake要求版本最低为2.8,当前为2.6,所以需要升级cmake版本。信息如下
shell> cmake . -DCMAKE_INSTALL_PREFIX=/db/mysql/mysql_57 -DMYSQL_DATADIR=/db/mysql/mysql_57/data
CMake Error at CMakeLists.txt:21 (CMAKE_MINIMUM_REQUIRED):
CMake 2.8.2 or higher is required. You are running version 2.6.4
-- Configuring incomplete, errors occurred!
shell> cmake --version
cmake version 2.6-patch 4
cmake官网下载地址
shell> tar zxvf cmake-3.2.2.tar.gz
shell> cd cmake-3.2.2/
shell> ./bootstrap
shell> make && make install
shell> cmake --version
cmake version 3.2.2
BOOST库
5.7编译需要boost类库,可使用 -DDOWNLOAD_BOOST=1 -DWITH_BOOST= 参数将在指定路径查找,如未找到会指定下载并解压到指定的路径
问题描述
shell> cmake . -DCMAKE_INSTALL_PREFIX=/db/mysql/mysql_57 -DMYSQL_DATADIR=/db/mysql/mysql_57/data
CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- Could not find (the correct version of) boost.
-- MySQL currently requires boost_1_57_0
CMake Error at cmake/boost.cmake:76 (MESSAGE):
You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=
安装boost库
shell> tar jxvf boost_1_57_0.tar.bz2
shell> cd boost_1_57_0/
shell> ./bootstrap.sh
shell> ./b2 install
安装后目录
shell> ls /usr/local/include/
boost
shell> cmake . -DCMAKE_INSTALL_PREFIX=/db/mysql/mysql_57 -DMYSQL_DATADIR=/db/mysql/mysql_57/data
mysql_install_db
之前版本mysql_install_db是在mysql_basedir/script下,5.7放在了mysql_install_db/bin目录下,且已被废弃。
shell> cd /db/mysql/mysql_57
shell> bin/mysql_install_db --basedir=. --datadir=data --user=mysql
[WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
shell> bin/mysqld --initialize
2015-04-21T18:17:53.169216Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-04-21T18:17:58.702510Z 0 [Warning] InnoDB: New log files created, LSN=45790
2015-04-21T18:17:59.538811Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-04-21T18:17:59.646010Z 0 [Warning] Failed to setup SSL
2015-04-21T18:17:59.646105Z 0 [Warning] SSL error: SSL context is not usable without certificate and private key
2015-04-21T18:17:59.663795Z 1 [Warning] A temporary password is generated for root@localhost: rq/Oh8VWs1Yh
初始化密码
mysql5.7会生成一个初始化密码,而在之前的版本首次登陆不需要登录。
shell> cat /root/.mysql_secret
Password set for user 'root@localhost' at 2015-04-22 22:13:23
?G5W&tz1z.cN
修改默认密码
shell> bin/mysqladmin -h localhost -u root password '123@qwe' -p'?G5W&tz1z.cN'
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
另外mysql5.7的mysql.user表结构被修改
修改mysql.user方式修改密码
mysql> update mysql.user set authentication_string=password('123qwe') where user='svoid' and Host = 'localhost';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
整理自网络
Svoid
2015-04-21
MySQL5.7源码安装问题汇总的更多相关文章
- mysql5.6源码安装(转)
mysql5.6源码安装 转自 jabbok博客园 https://www.cnblogs.com/jabbok/p/9418344.html 1 编译安装 1 2 3 4 5 6 groupadd ...
- Mysql5.5源码安装步骤笔记记录
1.cmake软件的安装wget https://cmake.org/files/v3.5/cmake-3.5.0-rc3.tar.gztar xf cmake-3.5.0.tar.gzcd cmak ...
- Linux MySQL5.5源码安装
环境:CentOS7,MySQL5.5 1.MySQL5.5源码下载 Oracle的网站打开较慢,http://mirrors.sohu.com/mysql/这里提供了MySQL的镜像.一般的,Lin ...
- MYSQL5.5源码安装 linux下
/* 首先安装必要的库 */ yum -y install gcc* ###### 安装 MYSQL ###### 首先安装camke 一.支持YUM,则 yum install -y cmake 二 ...
- ubuntu mysql5.7源码安装
本系列的lnmp的大框架基本上是按照http://www.linuxzen.com/lnmphuan-jing-da-jian-wan-quan-shou-ce-si-lnmpda-jian-yuan ...
- CentOS6.5+mysql5.1源码安装过程
一:先安装依赖包(不然配置的时候会报错的!) yum -y install ncurses* libtermcap* gcc-c++* 新建mysql用户 [root@HE1Packages]# gr ...
- Linux+Apache2.4+PHP5.6+MySQL5.6源码安装步骤
一.安装Apache 若要安装apache服务器软件,需要安装以下几个依赖软件 apr-1.4.6.tar.gz 下载地址:http://apr.apache.org/ apr-util-1.4.1. ...
- MySQL5.7源码安装
一.获取MySQL5.7.20源码安装包,并上传至服务器 MySQL官网下载地址:https://dev.mysql.com/downloads/mysql/ 下载版本:mysql-boost-5 ...
- mysql5.6源码安装
1.环境介绍: 包:mysql-5.6.24.tar.gz 平台:centos6.5 2.安装cmake编译工具和依赖包: yum install cmake -y yum install ncurs ...
随机推荐
- 【转载】谈MongoDB的应用场景
引用:http://blog.csdn.net/adparking/article/details/38727911 MongoDB的应用场景在网上搜索了下,很少介绍关于传统的信息化应用中如何使用Mo ...
- 记 页面使用overflow-scroll在iOS上滑动卡顿的问题
页面使用overflow-scroll在iOS上滑动卡顿的问题 因在做一个滑动的list列表,为某个div使用了overflow: scroll属性. 结果在手机上测试时,ios手机有明显的滑动卡顿问 ...
- 【PHP项目】伪静态规则
伪静态规则写法RewriteRule-htaccess详细语法使用 2016年03月30日 16:53:59 阅读数:20340 伪静态实际上是利用php把当前地址解析成另一种方法来访问网站,要学伪静 ...
- 裸机——LCD
1.先了解显示器们 CRT显示器 原理,使用电子轰击荧光粉实现显示. 特点,主动发光,颜色绚丽,但是大. 等离子显示器(PDP) 原理,在显示屏上排列上千个密封的小低压气体室,通过电流激发使其发出肉眼 ...
- <s:submit> 指定的method方法不执行
很多文章在讲一个表单多个提交方法的时候都是在<s:submit>中通过method来指定,但是我在试验中怎么也不对,jsp页面代码如下 <%@page import="or ...
- PHP.29-TP框架商城应用实例-后台6-商品会员添加-价格、级别
首先把需求分析搞清楚 主要实现两个功能 1.会员管理,设置成为会员的要求 2.添加商品时,可设置会员优惠价格 具体实现 1.建表[会员级别限定表p39_member_level{Id,级别名称,积分下 ...
- Python语法之com[1][:-7]
strCom = com[0] + ": " + com[1][:-7] 如上应该是一个字符串合成,最后的[1][:-7],我理解是去除com[1]的最后7个字符. 比如com[0 ...
- echo shell commands as they are executed
http://stackoverflow.com/questions/2853803/in-a-shell-script-echo-shell-commands-as-they-are-execute ...
- HNOI2018 摸鱼记
HNOI2018 摸鱼记 今天我又来记流水账啦 Day 0 颓废的一天. 我,球爷和杜教在颓膜膜.io ych看起来在搓碧蓝 鬼知道哥达鸭干了什么 学习氛围只局限在机房的一角 后来全体Oier开会,5 ...
- erlang连接mysql [转]
转自: http://blog.csdn.net/flyinmind/article/details/7740540 项目中用到erlang,同时也用到mysql.惯例,google. 但是,按照网上 ...