1. Preparation before installation
1 Yum Install GCC GCC Perl 2 Yum " Development Tools " 3 Yum Install bzip2-devel libcurl-devel
2, installation CMake
1 wget https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz2tar -zxvf cmake-3.4. 1. Tar . GZ 3 cd cmake-3.4. 1 4 ./Configure5make makeinstall
3. Download MySQL 5.6
1 wget http://cdn.mysql.com//downloads/mysql-5.6/mysql-5.6.28.tar.gz 2 tar -zxvf mysql-5.6. . Tar . GZ 3 CD mysql-5.6. -
4. Configuring compilation parameters
1 CMake2-dcmake_install_prefix=/usr/local/MySQL3-dmysql_unix_addr=/usr/local/mysql/Mysql.sock4-ddefault_charset=UTF85-ddefault_collation=Utf8_general_ci6-dwith_innobase_storage_engine=1 7-dwith_archive_storage_engine=1 8-dwith_blackhole_storage_engine=1 9-dmysql_datadir=/data/MySQLdbTen-dmysql_tcp_port=3306 One-denable_downloads=1
5. Compile and install (longer time)
Make Make Install
6. Configure user groups
1 Groupadd MySQL 2 useradd-r-g MySQL MySQL
7. Set up the database directory (/DATA/MYSQLDB)
mkdir -p/data/mysqldb
8. Change permissions
1 chown -R mysql:mysql/usr/local/MySQL2chown -R mysql:mysql/data/mysqldb
9. configuration file default location/usr/local/mysql/my.cnf (delete/etc/my.cnf)
1 rm /etc/my.cnf2chown mysql:mysql/usr/local/mysql/my.cnf
10. Start MySQL
1 CP support-files/mysql.server/etc/init.d/mysqld2 /etc/init.d/mysqld start
Startup success will occur
Starting MySQL. success!
11. Run the Security Settings script
/usr/local/mysql/bin/mysql_secure_installation
CentOS 6.7 Installation MySQL 5.6