MySQL installation and configuration (5.6.12, reference Le Novices blog, unfinished)

Source: Internet
Author: User

1, before the installation of the relevant description
Essential Packages and tools

1   GCC 5. Starting at 6, you need to compile with g++ .  2   cmake  5. 5 beginning with CMake for project management, CMake requires more than 2.8 versions.  3  bison   : The MySQL parser needs to be compiled with bison.  4   ncurses-devel   : A development package for terminal operations.  5   zlib    : MySQL uses zlib for compression

Package Required for function

1   libxml   : Support for XML input and output methods.  2  OpenSSL  : communicates using OpenSSL Secure sockets.  3   dtrace   : Used to diagnose MySQL problems.

About MySQL compilation parameters

1 Cmake_build_type compiled version type: Relwithdebinfo and debug, the difference is that Relwithdebinfo will be optimized. 2 cmake_install_prefix Specifies the destination path for the make install installation. 3 sysconfdir Specifies the default path for the configuration file. 4 mysql_datadir Specifies the default path for the data directory. 5 With_debug Specifies whether there is debugging information, commonly used for source debugging, open with_debug, production environment shutdown. 6 enabled_profiling Specifies whether the show profile can be used to display the details of the operation execution. 7 default_charset Specifies the default character set, which can be specified in the startup configuration file. 8 default_collation Specifies the default character comparison, sorting rules. 9 With_extra_charsets Specifies the other possible character sets that may be used. TenWITH_SSL Specifies the type of SSL, from 5.6. 6 Start the default bundled type, and optionally specify the path address of the SSL library.  One with_zlib Specifies the type of ZLIB to use for compression functions.  A enabled_local_infile Specifies whether the load data INFILE feature is allowed.  - With_embedded_server Specifies whether to compile the Libmysqld embedded library.  - install_layout Specifies the type of layout to install.  the with_storage_storage_engine Specifies the storage engine supported by the compilation, and the Myisam,merge,memory,csv storage engine is supported by default.  -For more detailed parameters, refer to http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html

More detailed parameters refer to http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html

This installation environment

1[Email protected] ~]#Cat/etc/Issue2CentOS Release6.9(Final)3 Kernel \ r on an \m4 5[Email protected] ~]#uname-a6Linux Base6.9 2.6. +-696. el6.x86_64 #1SMP Tue Mar +  +: in: toUtc .x86_64 x86_64 x86_64 Gnu/linux
1 5.6. thelog Source distribution2 installation directory is:/u01/app/mysql/3 Data directory:/u01/app/mysqldata/  45 Character set is: UTF8

2, source installation MySQL

1 Install the libraries you need to use first:2   Yum-YInstall GCC GCC-c++3   Yum-YInstallncurses-devel4 5 Download the required packages:6#将下载的文件都放到/usr/local/src directory, as follows7# cd/usr/local/src8#wgethttp//www.cmake.org/files/v2.8/cmake-2.8.11.1.tar.gz9#wgethttp//ftp.gnu.org/gnu/bison/bison-2.7.tar.gzTen#wgethttp//ftp.gnu.org/gnu/m4/m4-1.4.16.tar.gz One#wgethttp//www.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.12.tar.gz/from/http://cdn.mysql.com/ A  - Installing the CMake compiler -# cd/usr/local/src the#Tar-XVF cmake-2.8.11.1.Tar. GZ -# CD cmake-2.8.11.1 -# ./Bootstrap -# Make&& Make Install +  - Installing M4 +# cd/usr/local/src A#Tar-XVF m4-1.4. -.Tar. GZ at# CD m4-1.4. - -#./configure && Make&& Make Install -  - Installing Bison -# cd/usr/local/src -#Tar-XVF bison-2.7.Tar. GZ in# CD bison-2.7 -#./configure && Make&& Make Install to  + create MySQL users and groups, related directories -#/usr/sbin/Groupadd MySQL the#/usr/sbin/useradd-g MySQL MySQL *#mkdir-p/u01/app/MySQL $#Chown-R mysql:mysql/u01/app/MySQLPanax Notoginseng#mkdir-p/u01/app/mysqldata/data3306/ -#Chown-R mysql:mysql/u01/app/mysqldata/data3306/ the  + install MySQL A# cd/usr/local/src the#Tar-XVF mysql-5.6. A.Tar. GZ +# Export cflags="-o3-g-fno-exceptions-static-libgcc-fno-omit-frame-pointer-fno-strict-aliasing" -# Export cxxflags="-o3-g-fno-exceptions-fno-rtti-static-libgcc-fno-omit-frame-pointer-fno-strict-aliasing" $# Export cxx=g++ $# CD mysql-5.6. A -# Cmake-dcmake_install_prefix=/u01/app/mysql-dmysql_unix_addr=/tmp/mysql.sock-ddefault_charset=utf8-ddefault_ Collation=utf8_general_ci-dwith_extra_charsets=utf8,gbk-dwith_perfschema_storage_engine=1-dwith_federated_storage_engine=1-dwith_partition_storage_engine=1-dwith_archive_storage_engine=1-dmysql_datadir=/u01/app/mysqldata/data3306/-dsysconfdir=/u01/app/mysql/-dwith_ssl=bundled-denabled_local_ infile=1-dwith_innobase_storage_engine=1-dwith_blackhole_storage_engine=1-denable_downloads=1 -# Make&& Make Install the  - Initializing the databaseWuyi# cd/u01/app/MySQL the#./scripts/mysql_install_db--user=mysql--ldata=/u01/app/mysqldata/data3306/

3, after the installation of the finishing work

Configuring the Run Environment #VI/etc/Profile # PATH=/u01/app/mysql/bin:/u01/app/mysql/Lib: $PATH # export PATH # source/etc/Profile Creation Boot #CPsupport-files/my-default.cnf/etc/my.cnf #也可以将my. CNF copied directly to the installation file location #CPsupport-files/mysql.server/etc/init.d/mysqld # chkconfig--level *mysqld on # service mysqld start Check for success netstat-NTLP |grepMySQL set root password # mysqladmin-U root Password'XXX'login account # MySQL-uroot-pxxx Configuration Parameters Configure MY.CNF files according to system and business requirements

MySQL installation and configuration (5.6.12, reference Le Novices blog, unfinished)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.