ssh-copy-id better use root
ssh-copy-id finish
Reboot clustercontrol server
======sysbench======
[sysbench]
select
sysbench –num-threads=128 –report-interval=3 –max-requests=0 –max-time=300 –test=/usr/share/sysbench/tests/include/oltp_legacy/select.lua –mysql-table-engine=innodb –oltp-table-size=5000000 –mysql-user=root –mysql-password=“E<8r)^t-E<8r)^t-” –oltp-tables-count=1 –db-driver=mysql –mysql-host=192.168.xxx.xxx –mysql-port=3306 prepare
sysbench –num-threads=128 –report-interval=3 –max-requests=0 –max-time=300 –test=/usr/share/sysbench/tests/include/oltp_legacy/select.lua –mysql-table-engine=innodb –oltp-table-size=5000000 –mysql-user=root –mysql-password=“E<8r)^t-E<8r)^t-” –oltp-tables-count=1 –db-driver=mysql –mysql-host=192.168.xxx.xxx –mysql-port=3306 run
Oltp read/write
* 产生数据
sysbench –num-threads=128 –report-interval=3 –max-requests=0 –max-time=300 –test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua –mysql-table-engine=innodb –oltp-table-size=5000000 –mysql-user=root –mysql-password=“E<8r)^t-E<8r)^t-” –oltp-tables-count=1 –db-driver=mysql –mysql-host=192.168.xxx.xxx –mysql-port=3306 prepare
* 执行
sysbench –num-threads=128 –report-interval=3 –max-requests=0 –max-time=300 –test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua –mysql-table-engine=innodb –oltp-table-size=5000000 –mysql-user=root –mysql-password=“E<8r)^t-E<8r)^t-” –oltp-tables-count=1 –db-driver=mysql –mysql-host=192.
https://severalnines.com/docs/requirements.html#operating-system-user
https://bobcares.com/blog/database-crash-rescue-how-we-re-built-an-innodb-mysql-database-when-ibdata1-file-was-corrupted/
https://www.percona.com/blog/2014/10/14/recover-orphaned-innodb-partition-tablespaces-in-mysql/
https://tools.percona.com/wizard/
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name server generated for at 2017-04-26 15:24:40
[mysql]
# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
# GENERAL #
user = mysql
default-storage-engine = InnoDB
socket = /var/lib/mysql/mysql.sock
pid-file = /var/lib/mysql/mysql.pid
# MyISAM #
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP
# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000
# DATA STORAGE #
datadir = /var/lib/mysql/
create user ‘root’@'%' identified by ‘password’; grant ALL PRIVILEGES on *.* to ‘root’@'%' with grant option;
flush privileges;
if error have root@localhost
delete from mysql.user where user=‘root’;
flush privileges;
create user ‘root’@'%' identified by ‘password’;
grant ALL PRIVILEGES on *.* to ‘root’@'%' with grant option;
select user, host from user;
show grants for ‘root’@'%';
FLUSH PRIVILEGES;
=====restore root privileges=====
http://stackoverflow.com/questions/1709078/how-can-i-restore-the-mysql-root-user-s-full-privileges
character-set-server = utf8mb4
#tunning
skip_name_resolve = 1
open_files_limit = 65535
max_connect_errors = 1000000
table_open_cache = 1024
table_definition_cache = 1024
#table_open_cache_instances = 64 #MySQL 5.6
sort_buffer_size = 4M
join_buffer_size = 4M
interactive_timeout = 600
wait_timeout = 600
tmp_table_size = 32M
max_heap_table_size = 32M
#master_info_repository = TABLE #MySQL 5.6
#relay_log_info_repository = TABLE #MySQL 5.6
#gtid_mode = on
#enforce_gtid_consistency = 1
read_buffer_size = 8M
read_rnd_buffer_size = 4M
bulk_insert_buffer_size = 64M
lock_wait_timeout = 3600