PS:以上内容部分来自于网络
yum -y install gcc gcc-c++ make autoconf libtool-ltdl-devel gd-devel freetype-devel libxml2-devel libjpeg-devel libpng-devel openssl-devel curl-devel bison patch unzip libmcrypt-devel libmhash-devel ncurses-devel sudo bzip2 flex libaio-devel
cd /home/zjqiu tar zxf cmake-2.8.4.tar.gz cd cmake-2.8.4 ./bootstrap make && make install
useradd mysql -s /sbin/nologin -M cd .. tar zxf mysql-5.6.15.tar.gz cd mysql-5.6.15 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql5.6.15/ \ -DMYSQL_UNIX_ADDR=/data/mysql-3306/mysql.sock \ -DDEFAULT_CHARSET=utf8 \ -DDEFAULT_COLLATION=utf8_general_ci \ -DWITH_EXTRA_CHARSETS=all \ -DWITH_MYISAM_STORAGE_ENGINE=1 \ -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_MEMORY_STORAGE_ENGINE=1 \ -DWITH_READLINE=1 \ -DWITH_INNODB_MEMCACHED=1 \ -DWITH_DEBUG=OFF \ -DWITH_ZLIB=bundled -DENABLED_LOCAL_INFILE=1 \ -DENABLED_PROFILING=ON \ -DMYSQL_MAINTAINER_MODE=OFF \ -DMYSQL_DATADIR=/data/mysql-3306/data \ -DMYSQL_TCP_PORT=3306
make && make install ln -sv /usr/local/mysql5.6.15 /usr/local/mysql
cat >> /etc/my.cnf << EOF [client] port = 3306 socket = /data/mysql-3306/mysql.sock [mysql] no-auto-rehash prompt="(\\u:opdba:\D)[\\d]> " #pager="less -i -n -S" #tee="/home/mysql/query.log" [mysqld] #Misc user = mysql port = 3306 socket = /data/mysql-3306/mysql.sock basedir = /usr/local/mysql datadir = /data/mysql-3306/data/ ft_min_word_len=1 #event_scheduler = 1 max_allowed_packet = 32M #default_table_type = innodb #default_table_engine = innodb #Performance net_read_timeout = 60 wait_timeout = 100 interactive_timeout = 100 open_files_limit = 10240 back_log = 150 max_connections = 1000 max_connect_errors = 100000 external-locking = FALSE performance_schema = 0 #buffers & cache table_open_cache = 2048 #在mysql5.6不再支持table_cache table_definition_cache = 2048 max_heap_table_size = 246M tmp_table_size = 246M sort_buffer_size = 2M join_buffer_size = 2M thread_cache_size = 256 #thread_concurrency = 8 query_cache_size = 32M query_cache_limit = 2M query_cache_min_res_unit = 2k thread_stack = 192K read_buffer_size = 1M read_rnd_buffer_size = 16M bulk_insert_buffer_size = 64M #logs #log-output=file log-error=/data/mysql-3306/logs/mysql.err log_warnings = 2 slow-query-log slow-query-log-file=/data/mysql-3306/logs/slow-log.log long_query_time = 2 log-queries-not-using-indexes = 1 log-slow-admin-statements = 1 log-slow-slave-statements = 1 #binlog & replication server-id = 1 binlog_format = ROW binlog-row-image = minimal #binlog_format = MIXED log-bin = /data/mysql-3306/binlog/mysql-bin binlog_cache_size = 4M max_binlog_cache_size = 2G max_binlog_size = 1G expire_logs_days = 7 relay-log-purge = 1 sync_binlog = 0 skip-slave-start = 1 log-slave-updates = 1 #Myisam engine key_buffer_size = 32M myisam_sort_buffer_size = 128M myisam_max_sort_file_size = 10G #myisam_max_extra_sort_file_size = 10G myisam_repair_threads = 1 myisam_recover lower_case_table_names = 1 skip-name-resolve slave-skip-errors = 1032,1062 #Innodb engine innodb_additional_mem_pool_size = 16M innodb_buffer_pool_size = 20G innodb_data_file_path = ibdata1:1G:autoextend innodb_file_per_table = 1 innodb_thread_concurrency = 0 #innodb_thread_concurrency = 20 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 16M innodb_log_file_size = 256M innodb_log_files_in_group = 3 innodb_max_dirty_pages_pct = 75 innodb_lock_wait_timeout = 120 innodb_rollback_on_timeout innodb_status_file = 1 innodb_io_capacity = 800 transaction_isolation = READ-COMMITTED #transaction_isolation = repeatabled-read innodb_flush_method = O_DIRECT innodb-support-xa = 0 innodb_read_io_threads = 8 innodb_write_io_threads = 8 innodb_file_format = Barracuda # Other Set #gtid_mode = ON #enforce-gtid-consistency = true #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [mysqldump] quick max_allowed_packet = 32M [mysqld_safe] pid-file=/data/mysql-3306/mysqld.pid EOF
mkdir -p /data/mysql-3306/{binlog,logs,data} chown -R mysql.mysql /data/mysql-3306 cd /usr/local/mysql ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql5.6.15 --datadir=/data/mysql-3306/data/ --explicit_defaults_for_timestamp
cd /usr/local/mysql cp support-files/mysql.server /etc/rc.d/init.d/mysqld chkconfig --add mysqld chkconfig --level 35 mysqld on echo "export PATH=$PATH:/usr/local/mysql/bin" >> /etc/profile source /etc/profile
(root:opdba:Wed May 15 17:39:48 2013)[(none)]>
这部分只介绍了MySQL5.6一些新特性和安装配置~~.......
http://dev.mysql.com/doc/refman/5.6/en/index.html
http://www.geeksww.com/tutorials/database_management_systems/mysql/installation/download_configure_compile_and_install_mysql_56.php
本系列文章同步到:http://www.opdba.com/?p=188
本文出自 “->” 博客,谢绝转载!