MySQL5.7 Source Installation Problem Summary

Source: Internet
Author: User
Tags deprecated

Compile and install the mysql5.7 version, want to try a new version of the features, found that with the previous version of the 5.6 compiled some changes, summed up to avoid the future into the pit. 5.6 Mounting method

CMake version

5.7 Compile CMake requires a minimum version of 2.8 and is currently 2.6, so you need to upgrade the CMake version. Information is as follows

Shell> CMake. -dcmake_install_prefix=/db/mysql/mysql_57-dmysql_datadir=/db/mysql/mysql_57/datacmake 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--versioncmake version 2.6-patch 4

CMake official website

Shell> tar zxvf cmake-3.2.2.tar.gzshell> cd cmake-3.2.2/shell> ./bootstrapshell> make && make installshell> cmake--versioncmake version 3.2.2
Boost Library

5.7 Compile requires BOOST class library, you can use the-ddownload_boost=1-dwith_boost= parameter to find it in the specified path, if not found will refer to

set and unzip to the specified path

Problem Description 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_0cmake error at cmake/boost.cmake:76   (MESSAGE):   you can download it with -ddownload_boost=1 -dwith_ boost= Installing the Boost library Shell> tar jxvf boost_1_57_0.tar.bz2shell> cd boost_1_57_0/shell > ./bootstrap.shshell> ./b2 install post-installation directory shell> ls /usr/local/include/ Boostshell> cmake . -dcmake_install_prefix=/db/mysql/mysql_57 -dmysql_datadir=/db/mysql /mysql_57/data


mysql_install_db

Prior version mysql_install_db was under Mysql_basedir/script, 5.7 was placed under the Mysql_install_db/bin directory and was deprecated.

Shell> cd /db/mysql/mysql_57shell> bin/mysql_install_db --basedir=. --datadir= data --user=mysql[warning] mysql_install_db is deprecated. please consider  switching to mysqld --initializeshell> bin/mysqld --initialize2015-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=457902015-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 ssl2015-04-21t18 : 17:59.646105z 0 [warning] ssl error: ssl context is not usable without certificate and  Private key2015-04-21t18:17:59.663795z 1 [warning] a temporary password is  generated for [email protected]: rq/oh8vws1yh

mysql5.7的数据库初始化如下:


Shell>/usr/local/mysql/bin/mysqld--initialize--user=mysql--basedir=/usr/local/mysql/--datadir=/usr/local/ mysql/data/
Initialize password

mysql5.7 generates an initial password, and the previous version does not need to be logged on for the first login.

shell> cat /root/.mysql_secret # password set for user  ' [Email  protected] '  at 2015-04-22 22:13:23 ? g5w&tz1z.cn Modify the default password Shell> bin/mysqladmin -h localhost -u root password   ' [email protected] '  -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. 

In addition mysql5.7 's Mysql.user table structure was modified

Modify Mysql.user mode Change Password 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:0mysql> flush privileges; Query OK, 0 rows Affected (0.00 sec)


Organized from: http://blog.itpub.net/29733787/viewspace-1590891/

This article is from the "Mq_douer" blog, make sure to keep this source http://douer.blog.51cto.com/6107588/1922603

MySQL5.7 Source Installation Problem Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.