First, install MySQL
Operating Environment :
System version |
CENTOS-7-X86_64-DVD-1503-01 (the system has configured the network, can be connected to the extranet, for the following using Yum installation dependency package preparation) |
Software version |
Mysql-5.6.20.tar.gz |
preparatory work :
1. Download mysql-5.6.20.tar.gz Source installation package
|
Http://pan.baidu.com/s/1mgq2gpa |
Extract password |
Syy3 |
2. Copy the installation package to the/usr/local/mysql folder (no folders can be used to create the folder using the command mkdir MySQL)
3, check whether the system has been installed mSQL
rpm-qa|grep MySQL // if it is already installed, use the following command to uninstall rpm-e--nodeps file name
Compile and install:
1. Decompression
Tar-xvzf mysql-5.6.20.tar.gz
2. Install the package that MySQL depends on
[[email protected] mysql]# yum-y install make gcc-c++ cmake bison-devel ncurses- devel Libaio [[email Protected] mysql]# yum install Libaio libaio Span style= "color: #008000;" >-devel- y [ [email protected] mysql]# yum Install Perl -data-dumper- y [[email protected] mysql]# -tools-y
3. Compiling
[Email protected] mysql]#CD mysql-5.6.20/[[email protected] MySQL-5.6.20]# cmake \
-dcmake_install_prefix=/usr/local/mysql \
-dmysql_datadir=/usr/local/mysql/data \
-dsysconfdir=/etc \
-dwith_myisam_storage_engine=1 \
-dwith_innobase_storage_engine=1 \
-dwith_memory_storage_engine=1 \
-dwith_readline=1 \
-dmysql_unix_addr=/var/lib/mysql/mysql.sock \
-dmysql_tcp_port=3306 \
-denabled_local_infile=1 \
-dwith_partition_storage_engine=1 \
-dextra_charsets=all \
-ddefault_charset=utf8 \
-ddefault_collation=utf8_general_ci
4, to this point, MySQL installation success!
Problems that may occur:--configuring incomplete,errors orrcurred!
Solution:
1. Download Ncurses-devel
2. Delete CMakeCache.txt
3, Installation Ncurses-devel
4. Recompile
[[email protected] MySQL-5.6.20] -dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/usr/local/mysql/data-dsysconfdir=/etc-dwith_myisam _storage_engine=1-dwith_innobase_storage_engine=1-dwith_memory_storage_engine=1-dwith_readline=1-dmysql_unix_ Addr=/var/lib/mysql/mysql.sock-dmysql_tcp_port=3306-denabled_local_infile=1-dwith_partition_storage_engine=1- Dextra_charsets=all-ddefault_charset=utf8-ddefault_collation=utf8_general_ci
Second, the configuration mSQL
Centos7 Source Installation mysql-5.6.20