The Mysql database installation step is configure. Therefore, the installation method is Cmake, which is different from the configure version earlier than 5.5. The following are detailed installation steps: 1, extract the compressed file: tar-zxvf mysql-5.6.4-m7.tar.gz 2, enter the decompressed Folder: cd mysql-5.6.4-m7 3, understand Mysql CMAKE configuration options: www.2cto.com 1> function of the basic configuration command Configure command CMake. /configure cmake. configure by default. /configure -- help cmake. -LH or ccmake. view the 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 option configure option CMake option function www.2cto.com -- prefix =/usr-DCMAKE_INSTALL_PRE FIX =/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_SHARED IR = share shared data directory -- libdir =/usr/lib64/mysql-DINSTALL_LIBDIR = lib64/mysql Library File Installation Directory www.2cto.com -- export dedir =/usr/include/mysql-DINSTALL_INCLUDEDIR = include/ mysql header file installation directory -- infodir =/usr/share/info-DINSTALL_INFODIR = share/info Info file directory www.2cto.com 3> Mysql storage engine option because Mysql storage engine plug-ins are required the Command Option selects the engine type to be used, for example: innoDB, ARCHIVE, and BLACKHOLE engines:-DWITH_INNOBASE_STORAGE_ENGINE = 1-DWITH_ARCHIVE_STORAGE_ENGIN E = 1-DWITH_BLACKHOLE_STORAGE_ENGINE = 1 4> other options: configure option CMake option -- 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 the Local variable that supports data import -- with-extra-charsets = all-DEXTRA_CHARSETS = all additional character set -- with-charset = utf8-DDEFAULT_CHARSET = utf8 default Character Set www.2cto.com -- with-c Ollation = export-DDEFAULT_COLLATION = utf8_general_ci default sorting character set -- with-mysqld-user = mysql-DMYSQL_USER = mysql start mysql -- without-debug-DWITH_DEBUG = 0 whether debugging is supported 4. Add new user sudo adduser mysql 5. After configuring the Mysql installation options as needed, you can select the appropriate Command Options for installation as needed. Cmake. -DCMAKE_INSTALL_PREFIX =/mysql \-DMYSQL_DATADIR =/mysql/Data \-DMYSQL_UNIX_ADDR =/tmp/mysql. sock \-DMYSQL_USER = mysql \-runtime = 1 \-DWITH_INNOBASE_STORAGE_ENGINE = 1 \-runtime = 1 \-DENABLED_LOCAL_INFILE = 1 (Note: If you run cmake, the Curses library not found error is reported to clear the cache, run the Cmake command again) make www.2cto.com sudo make install 6. install the default database Cd/mysql/scripts sudo. /mysql_install_db -- basedir =/usr/local/mysql -- datadir =/usr/local/mysql/data -- user = mysql (if an error occurs, FATALERROR: cocould not find. /bin/my_print_defaults. Note that the options are "--" rather than "-". 7. Copy the mysql configuration file to the path cd/usr/local/mysql/support-files sudo cp my-medium.cnf/etc/my. cnf 8. Copy the service file (which can be used when using the service command) sudo cp mysql. server/etc/init. d/mysqld 9. Switch the user to mysql and start mysql su mysql www.2cto.com service Mysqld start exit (su mysql-c "service mysqld start" is recommended) 10. Check the startup status. netstat-nat Active Internet connections (servers and established) proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0.0.0.0: 3306 0.0.0.0: * LISTEN because mysql has to set the default port to 3306 on unspecified ports, therefore, mysql has been installed successfully. 11. Set a soft connection, add mysql (Basic command), mysqldump (Backup command), and mysqladmin (management command) run www.2cto.com sudo ln-s/usr/local/mysql/bin/mysql/usr/bin sudo ln-s/usr/local/in the shell/ mysql/bin/mysqldump/usr/bin sudo ln-s/usr/local/mysql/bin/mysqladmin/usr/bin all installation work has been completed! Author xinhanggebuguake