Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Summary of installation problems of MySQL5.7 source code

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Compile and install the mysql5.7 version, want to try out the new version features, found that there are some changes with the previous version 5.6 compilation, sum up to avoid further pit in the future. 5.6 installation mode

Cmake version

5.7. compiling cmake requires a minimum version of 2.8. the current version is 2.6, so you need to upgrade the cmake version. The 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 cmake-Configuring incomplete, errors occurredpowered shell > cmake-- versioncmake version 2.6-patch 4

Download address of 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.2BOOST Library

Boost class library is required for compilation. You can use the-DDOWNLOAD_BOOST=1-DWITH_BOOST= parameter to find it in the specified path. If it is not found, it will refer to

Download and extract 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= install boost library shell > tar jxvf boost_1_57_0.tar.bz2shell > cd boost_1_57_ 0/shell >. / bootstrap.shshell >. / b2 install 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

The previous version of mysql_install_db is under mysql_basedir/script, 5.7 under the mysql_install_db/bin directory, and has been abandoned.

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 root@localhost: rq/Oh8VWs1Yh

The database initialization of mysql5.7 is as follows:

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

Mysql5.7 will generate an initialization password, and login is not required for the first login in the previous version.

Shell > cat / root/.mysql_secret # Password set for user 'root@localhost' at 2015-04-22 22:13:23? G5W&tz1z.cN modify the default password shell > bin/mysqladmin-h localhost-u root password' 123qwee'- 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, the mysql.user table structure of mysql5.7 has been 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)

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report