Therefore, the installation method uses Cmake, which is different from the configure version earlier than 5.5. The installation steps are as follows:
1. decompress the compressed file:
Tar-zxvf mysql-5.6.4-m7.tar.gz
2. Go to the decompressed Folder:
Cd mysql-5.6.4-m7
3. Understand the CMAKE configuration options of Mysql:
1> basic configuration commands
Configure command |
CMake command |
Function |
./Configure |
Cmake. |
Configure by default |
./Configure -- help |
Cmake.-LH or ccmake. |
View Command help |
Make clean Rm config. cache |
Make clean Rm CMakeCache.txt |
Clear old object files and cached information before reconfiguration and compilation |
2> Mysql installation layout options
Configure options |
CMake Option |
Function |
-- Prefix =/usr |
-DCMAKE_INSTALL_PREFIX =/usr |
Installation home directory |
-- Libexecdir =/usr/sbin |
-DINSTALL_SBINDIR = sbin |
Mysqld directory |
-- Localstatedir =/var/lib/mysql |
-DMYSQL_DATADIR =/var/lib/mysql |
Data Directory |
-- Sysconfdir =/etc/mysql |
-DSYSCONFDIR =/etc/mysql |
Config directory (my. cnf) |
-- With-plugindir =/usr/lib64/mysql/plugin |
-DINSTALL_PLUGINDIR = lib64/mysql/plugin |
Plug-in Directory |
-- Mandir =/usr/share/man |
-DINSTALL_MANDIR = share/man |
Help document directory |
-- Sharedstatedir =/usr/share/mysql |
-Dinstall_1_dir = share |
Shared data directory |
-- Libdir =/usr/lib64/mysql |
-DINSTALL_LIBDIR = lib64/mysql |
Library File Installation Directory |
-- Includedir =/usr/include/mysql |
-DINSTALL_INCLUDEDIR = include/mysql |
Header file installation directory |
-- Infodir =/usr/share/info |
-DINSTALL_INFODIR = share/info |
Info file directory |
3> Mysql storage engine options
Because Mysql storage engine room plug-ins are used, you need to use Command Options to select the engine types you want to use, such as InnoDB, ARCHIVE, and BLACKHOLE engines:
-DWITH_INNOBASE_STORAGE_ENGINE = 1
-DWITH_ARCHIVE_STORAGE_ENGINE = 1
-DWITH_BLACKHOLE_STORAGE_ENGINE = 1
4> other options
Configure options |
CMake Option |
Function |
-- With-tcp-port-= 3306 |
-DMYSQL_TCP_PORT = 3306 |
TCP/IP Port Number |
-- With-unix-socket-path =/tmp/mysqld. sock |
-DMYSQL_UNIX_ADDR =/tmp/mysqld. sock |
UNIX socket File |
-- Enable-local-infile |
-DENABLED_LOCAL_INFILE = 1 |
Enable Local variables that support data import |
-- With-extra-charsets = all |
-DEXTRA_CHARSETS = all |
Additional Character Set |
-- With-charset = utf8 |
-DDEFAULT_CHARSET = utf8 |
Default Character Set |
-- With-collation = utf8_general_ci |
-DDEFAULT_COLLATION = utf8_general_ci |
Default sorting Character Set |
-- With-mysqld-user = mysql |
-DMYSQL_USER = mysql |
Mysql Initiator |
-- Without-debug |
-DWITH_DEBUG = 0 |
Debugging supported? |