Source package installation Mysql:1, download source package www.mysql.com# md5sum mysql-5.6.25.tar.gz37664399c91021abe070faa700ecd0ed mysql-5.6.25.tar.gz2, Unzip and go to the unpacked directory # TAR-XF mysql-5.6.25.tar.gz# CD mysql-5.6.25 create MySQL User: # groupadd mysql# useradd-r-G mysql-s/bin/false my SQL3, installation Three steps (configuration, compilation, installation) Requirements: Installation directory:/MYSQL25 Data directory:/mysql25/data Port: 3308sock:/mysql25/mysql.sockcmake_install_prefix=/ MYSQL25 Specifies the installation base directory default_charset= default character set default_collation= character set sorting enabled_local_infile= whether to load external files default off 1 means open; 0 means turn off MySQL _tcp_port Port number mysql_unix_addr Specify sock file location sysconfdir system configuration file path Mysql_datadir database data directory With_extra_charsets extended character set Without_ Xxx_storage_engine does not compile the storage engine into the MySQL static library with_xxx_storage_engine compiles the storage engine into the MySQL Static library # vim cmake.sh---> cmake. -DCMAVIMKE_INSTALL_PREFIX=/MYSQL25-DENABLED_LOCAL_INFILE=1-DMYSQL_DATADIR=/MYSQL25/DATA-DSYSCONFDIR=/MYSQL25/- dwith_innobase_storage_engine=1-dwith_partition_storage_engine=1 \ Support Partition-dmysql_unix_addr=/mysql25/mysql.socket- Ddefault_charset=utf8-ddefault_collation=utf8_general_ci-dwith_extra_charsets=all-dmysql_user=mysql-dmysql_tcp_port=3308# chmod o+x cmake.sh "or # CMake. -dcmake_install_prefix=/mysql25-denabled_local_infile=1 ... "Ready to work: # yum-y INSTALL cmake# mkdir/mysql25# chown-r MySQL. /MYSQL25 error Hint:--Could not find Curses (missing:curses_library curses_include_path) CMake error at Cmake/readline.cmake : (MESSAGE): Curses library not found. Install appropriate package, FIX: Installation required Packages: # yum-y install ncurses-devel# rm-f cmakecache.txt# bash cmake.sh# make# Make install# scripts/mysql_install_db--user=mysql----Initialize Database build mysql25 startup script File # CP support-files/mysql.server/etc/ INIT.D/MYSQL25 Note: Modify the script file (VIM/ETC/INIT.D/MYSQL25) basedir=/usr/local/mysql25datadir=/usr/local/mysql25/data9, Test the validation with the script again #/etc/init.d/mysql25---script start # service MYSQL25 restart initialization: Login: # export path= $PATH:/usr/local/mysql25/bin#/usr /local/mysql25/bin/mysql------into MySQL character set and character encoding: characters: Universal Character set for all symbols: Unicode (uniform character Set): ascii:gb2312: The Chinese character set gbk:gb2312 the extended character set of the GB18030:GBK character encoding of the character set in the three countries of China, Japan, and Korea: UTF-8 UTF-16 UCS-2 ucs-4gbk/gb2312gb18030 character compilationCode per character bytes Asccii 1utf-8 (UNICODE) 1-6utf-16 2-4gbk/gb2312 1-2gb18030 1-4 error Hint: CMake error at/usr/share/cmake/modules/ Cmakecxxinformation.cmake:17 (get_filename_component): Get_filename_component called with incorrect number of Argumentscall Stack (most recent call first): Cmakelists.txt:3 (PROJECT) CMake Error:cmake_cxx_compiler no set, after Enab Lelanguagecmake error:internal CMake Error, trycompile Configure of CMake failed--performing Test have_peercred-failed FIX: Yum-y install gcc-*/soft/mysql-5.6.25/sql/sql_planner.cc:in member function ' void Optimize_table_order::best_ Access_path (join_tab*, table_map, uint, bool, double, position*, position*) ':/soft/mysql-5.6.25/sql/sql_planner.cc : 431:warning: ' Loose_scan_opt. Loose_scan_opt::best_loose_scan_start_key ' May is used uninitialized in this functiostarting MySQL. The server quit without updating PID file (/mysql25/data/zy.uplooking.com.pid).
Mysql-Source Package installation