System Centeros 6.5
1. Install the dependent package (CMake make GCC, etc., in fact, many have, do not need to update, in order to prevent the world from being destroyed, install)
Yum install gcc gcc-c++-y
Yum Install-y ncurses-devel.x86_64
Yum Install-y cmake.x86_64
Yum Install-y libaio.x86_64
Yum Install-y bison.x86_64
Yum Install-y gcc-c++.x86_64
2. Install Boost library 1.59 (listen to the master said, can only be this version, did not try other, lazy is the nature of the landlord, so the rookie follow the order to go)
wget http://nchc.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gztar zxvf boost _1_59_0. tarmv boost_1_59_0/usr/local/boost
3. Add user groups and users MySQL (again referring to the commands of various gods)
Groupadd MySQL useradd-g mysql MySQL
4. Download the installation mysql5.7.13 (may need fq when downloading?) always open agent landlord do not know whether the need to FQ ... Then there is the need for root authority, which is certainly OK)
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13.tar.gz
Tar zxvf mysql-5.7.13.Tar.GZCD mysql-5.7.cmake-dcmake_install_prefix=/home/mysql-dmysql_datadir=/home/mysql/data- Ddefault_charset=utf8-ddefault_collation=utf8_general_ci-dmysql_tcp_port=3306- Dmysql_user=mysql-dwith_myisam_storage_engine=1-dwith_innobase_storage_engine=< Span style= "color: #800080;" >1-dwith_archive_storage_engine=1-dwith_blackhole_storage_engine=1-dwith_memory_storage_engine=1-ddownload_boost=1 -dwith_boost=/usr/local/boostmake && make install
5. Initialize the database (that is, the database configuration, oh, too to force the program, we must remember the same password, the landlord lost countless times, finally success)
/home/mysql/bin/mysqld--initialize--user=mysql--basedir=/home/mysql--datadir=/home/mysql/data
#返回信息最后一行 2016-07-21t07: $: for[email protected]: kqqck:lmc15u #密码要保存
6. Adjust the configuration file (various copy paste)
mv/etc/my.cnf/etc/my.cnf.bakcp/home/mysql/support-files/my-default.cnf/etc/my.cnf
7. Start the MySQL instance
/home/mysql/bin/mysqld_safe
8. Open a console, log in to MySQL, and enter the password that hurts.
cd/home/mysql/bin./mysql -uroot-p
9. Change password alter user ' root ' @ ' localhost ' identified by ' 123456 ';
123456789101112131415 |
#提示信息
#Enter password:
#Welcome to the MySQL monitor. Commands end with ; or \g.
#Your MySQL connection id is 3
#Server version: 5.7.13
#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> alter user
‘root‘
@
‘localhost‘ identified by
‘123456‘
;
|
10. At this point, the MySQL 5.7.13 compilation installation is successful.
MySQL5.7.13 source Code compilation Installation Guide (GO)