Installing software dependency Packages
Yum-y install gcc gcc-c++ ncurses ncurses-devel cmake
Download package
Cd/usr/local/src
wget https://downloads.mysql.com/archives/get/file/mysql-5.7.13.tar.gz--no-check-certificate
Download Boost Library, MySQL 5.7.5 start boost Library is required
cd/usr/local/
wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz--no-check-certificate
Tar zxvf boost_1_59_0.tar.gz
Create an installation user
Useradd-m-s/sbin/nologin MySQL
Create the installation directory
Mkdir-p/usr/local/mysql
Create Data Catalog
mkdir/mysql3306
To create a configuration file directory
Mkdir-p/usr/local/mysql/etc
Create a database log directory
Mkdir-p/usr/local/mysql/logs
Compiling the installation
Cd/usr/local/src
Tar zxvf mysql-5.7.13.tar.gz
CMake \
-dcmake_install_prefix=/usr/local/mysql \
-dmysql_datadir=/mysql3306/\
-dmysql_unix_addr=/usr/local/mysql/mysql.sock \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-dextra_charsets=all \
-denabled_local_infile=1 \
-dwith_innobase_storage_engine=1 \
-ddownload_boost=1 \
-dwith_boost=/usr/local/boost_1_59_0
Make && make install
Build configuration file
To create a configuration file directory
Mkdir-p/usr/local/mysql/etc
CP support-files/my-default.cnf ETC/MY.CNF
Editing a configuration file
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/94/FD/wKiom1kQaqmRje_QAABGw-Snr6c524.png-wh_500x0-wm_ 3-wmp_4-s_2431121535.png "title=" 111.png "alt=" Wkiom1kqaqmrje_qaabgw-snr6c524.png-wh_50 "/>
Modify permissions for the installation directory
Chown-r mysql:mysql/usr/local/mysql/
Copy the startup script for the configuration file
Cp/app/mysql/mysql/support-files/mysql.server/etc/init.d/mysqld
Adding a MySQL command to an environment variable
Export path= $PATH:/usr/local/mysql/bin
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/94/FD/wKiom1kQZkuRrBIjAAAdFTmDdr4447.png-wh_500x0-wm_ 3-wmp_4-s_4273069702.png "title=" Cnf.png "alt=" Wkiom1kqzkurrbijaaadftmddr4447.png-wh_50 "/>
Source/etc/profile
Initializing Database Settings
./mysqld--initialize-insecure
Start the database
/etc/init.d/mysqld start
Database error
/etc/init.d/mysqld start
Starting mysql.the server quit without updating PID file (/[failed]l/mysql/mysqld.pid).
Viewing the error log
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/94/FD/wKioL1kQayfjGS8ZAABeLQO1RCo053.png-wh_500x0-wm_ 3-wmp_4-s_2524963477.png "title=" E1.png "alt=" Wkiol1kqayfjgs8zaabelqo1rco053.png-wh_50 "/>
Workaround
Chown-r mysql:mysql/mysql3306
Log in and view the database, the default installed database does not have a password
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/94/FD/wKioL1kQa7DT79wjAAAdd5V1PQE614.png-wh_500x0-wm_ 3-wmp_4-s_3709029298.png "title=" 2.png "alt=" Wkiol1kqa7dt79wjaaadd5v1pqe614.png-wh_50 "/>
To set a password for a database
After the version update, the original user's password field has been changed to authentication_string
Log in to MySQL
mysql> Update Mysql.user Set Authentication_string=password (' 123qwe ') where user= ' root ' and Host = ' localhost ';
Query OK, 1 row affected, 1 warning (0.01 sec)
Rows matched:1 changed:1 warnings:1
mysql> flush Privileges;
Login Verification
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/94/FE/wKiom1kQbPXBjh0nAABbgRXAUqA413.png-wh_500x0-wm_ 3-wmp_4-s_2494590542.png "title=" authentication. png "alt=" wkiom1kqbpxbjh0naabbgrxauqa413.png-wh_50 "/>
This article is from the "Sdsca" blog, make sure to keep this source http://sdsca.blog.51cto.com/10852974/1923430
Centos 6.5 below source compile install Mysql 5.7.13