Percona MySQL compilation installation to CentOS6.5

Source: Internet
Author: User
Tags openssl percona percona server

Download percona-server-5.6.26-74.0.tar.gz
Install some of the necessary software with Yum:

Yum-y install make gcc gcc-c++ cmake bison-devel ncurses-devel gcc \
autoconf* automake* zlib* fiex* libxml* libmcrypt* libtool-ltdl-devel* \
OpenSSL openssl-devel ncurses compat* MPFR cpp glibc readline-devel

Unzip Percona Server, and then enter:

cmake-dcmake_install_prefix=/usr/local/mysql/\
-DSYSCONFDIR=/ETC \
-dwith_innobase_storage_engine=1 \
-dwith_archive_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_partition_storage_engine=1 \
-dmysql_unix_addr=/var/run/mysql.sock \
-dmysql_tcp_port=3306 \
-denabled_local_infile=1 \
-dextra_charsets=all-ddefault_charset=utf8-ddefault_collation=utf8_general_ci-dmysql_user=mysql

Make

Make install

Build MySQL service in/usr/local/mysql when make is successful

cd/usr/local/mysql/
CP Support-files/mysql.server/etc/init.d/mysql



Mkdir-p/data/mysql/data

Chown-r MySQL. /data

To create a my.cnf file:

[mysqld] #sql_mode = "Strict_trans_tables,no_auto_create_user,no_engine_substitution" pid-file=/data/mysql/ Mysqld.piddatadir = /data/mysql/datasocket=/data/mysql/mysql.sockuser=mysqlcharacter-set-server  = utf8port = 3306# disabling symbolic-links is recommended to  prevent assorted security risks#symbolic-links=0default-storage-engine=innodbexplicit_ Defaults_for_timestamp=truemax_connections = 300#sort_buffer_size = 16m#join_buffer_size  = 16m#read_buffer_size = 24m#read_rnd_buffer_size = 24m#bulk_insert_buffer_size =64m#innodb# #if  the below parameter added later, mysql cannot  Startup.innodb_data_home_dir=/data/mysql/inndb_datainnodb_data_file_path=ibdata1:2048m:autoextendinnodb_file_ Per_table=1innodb_file_format=barracudainnodb_buffer_pool_size = 1g  innodb_buffer_pool_ instances=3innodb_purge_threads=1innodb_sUpport_xa=falseinnodb_flush_method = o_directinnodb_io_capacity=200skip_innodb_adaptive_hash_ Indexinnodb_read_io_threads=8innodb_write_io_threads=8innodb_change_buffering=allinnodb_stats_on_metadata= Offinnodb_log_group_home_dir=/data/mysql/innodb_loginnodb_log_buffer_size = 16minnodb_log_file_size  = 256m  innodb_log_files_in_group = 3  innodb_flush_log_at_trx_commit =2innodb_autoinc_lock_mode=2innodb_additional_mem_pool_size = 32m  innodb_thread_ Concurrency=8 skip_grant_tablesmax_tmp_tables=100query_cache_size=0query_cache_type=0max_prepared_stmt_ count=1048576sort_buffer_size=32769#binlog#binlog-do-db=sumarc#binlog-do-db=middlewarelog-bin=/data/mysql/ Binlog/bin-file.logbinlog_cache_size = 1mbinlog_format=mixedmax_binlog_size=256mmax_binlog_cache_ size=50mexpire_logs_days = 91sync_binlog=2#slow_query_log=on#long_query_time=1#slow_query_log_file=/ data/mysql/slowlog/mysql-slowlog-error=/data/mysql/mysqld_error.log#slave-skip-errors=1032,1062,126,1114,1146,1048,1396#skip-host-cache# Skip-name-resolve#rpl_semi_sync_master_enabled=1#rpl_semi_sync_master_timeout=1000#rpl_semi_sync_master_trace_ level=32#rpl_semi_sync_master_wait_no_slave=on[mysqld_safe]pid-file=/data/mysql/mysqld.pid#socket=/var/run/ Mysql.sock[client]socket=/data/mysql/mysql.sock

Populate data:

scripts/mysql_install_db--basedir=/usr/local/mysql--datadir=/data/mysql/data/--user=mysql

Start MySQL:

/etc/init.d/mysql start

Startup success

This article is from the "Technical Blog" blog, please be sure to keep this source http://raytech.blog.51cto.com/7602157/1701580

Percona MySQL compilation installation to CentOS6.5

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.