## Mysql installed from Source enabling innodb XtraDB option
## Please check the Supporting plugins for Mysql which your using
## Innodb plugin help site
http://www.innodb.com/doc/innodb_plugin-1.0/innodb-plugin-installation.html#innodb-plugin-installation-dynamic
yum install compat-libstdc++-33.x86_64
groupadd mysql
useradd -g mysql mysql
wget http://download.softagency.net/MySQL/Downloads/MySQL-5.1/mysql-5.1.41-linux-x86_64-glibc23.tar.gz ( we need specific version of mysql which supports innodb-plugin)
wget http://www.innodb.com/download/innodb_plugin/innodb_plugin-1.0.6-linux-i686-glibc23.tar.gz
tar zxvf mysql.....
mv mysql... /usr/local/mysql
tar zxvf innodb-lugin.xxxxx
cp ha_innodb.so /usr/local/mysql/lib/plugin/
cd /usr/local/mysql
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
/usr/local/mysql/bin/mysqld_safe --user=mysql &
# login to mysql
/usr/local/mysql/bin/mysql -uroot -p (password set is admin)
mysql> show plugins;
+---------------------+----------+--------------------+--------------+---------+
| Name | Status | Type | Library | License |
+---------------------+----------+--------------------+--------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL |
| BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| FEDERATED | DISABLED | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | ha_innodb.so | GPL |
| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | ha_innodb.so | GPL |
| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | ha_innodb.so | GPL |
| INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | ha_innodb.so | GPL |
| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | ha_innodb.so | GPL |
| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb.so | GPL |
| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | ha_innodb.so | GPL |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb.so | GPL |
+---------------------+----------+--------------------+--------------+---------+
## add entries in my.cnf
[mysqld]
# xdb plugin config
ignore_builtin_innodb
default-storage-engine=InnoDB
innodb_file_format=barracuda
innodb_strict_mode=1
plugin-load=innodb=ha_innodb.so;innodb_trx=ha_innodb.so;innodb_locks=ha_innodb.so;innodb_lock_waits=ha_innodb.so;innodb_cmp=ha_innodb.so;innodb_cmp_reset=ha_innodb.so;innodb_cmpmem=ha_innodb.so;innodb_cmpmem_reset=ha_innodb.so
skip-locking
#common config ( this u can tune according as per your needs)
innodb_buffer_pool_size = 8G
#innodb_ibuf_max_size = 4G
innodb_additional_mem_pool_size = 20M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 30
innodb_flush_method = O_DIRECT
innodb_thread_concurrency = 32 # or 0, or 32
innodb_open_files = 2000
innodb_file_per_table
innodb_log_file_size=128M
innodb_log_files_in_group=2
log_bin_trust_function_creators = 1
# tune
innodb_checksums=0
innodb_doublewrite=0
innodb_support_xa=0
innodb_max_dirty_pages_pct=15
innodb_max_purge_lag=0
innodb_read_io_threads = 16
innodb_write_io_threads = 16
innodb_io_capacity = 400 ## no of hdds in raid (100 x4 )
# for xdb
#innodb_adaptive_checkpoint= 1 # or 0
#innodb_thread_concurrency_timer_based= 0 # or 1
# for plugin 4
innodb_adaptive_flushing = 1 ## (ON by default, but let's precise)
No comments:
Post a Comment