ZABBIX数据库TokuDB引擎改造---mysqldump方式



createtime :2015-12-25
updatetime:2018-03-09

10.1.3.14--->10.1.3.15
master            slave

定义:
老从库:使用innodb引擎的库,端口3306
新从库:使用tokudb引擎的库,端口3307

整体思路:
a、从库安装tokudb数据库新实例3307 ( 在新从库中 建所需tokudb引擎表history等 )
b、从库老数据导入到tokudb   3306-->3307 
c、应用切换到从库
d、同法改造主库

一、安装tokudb数据库,建表
cd /usr/local
tar xzvf percona-5.5.30-tokudb-7.0.1-linux-x86_64.tar.gz 
mv percona-5.5.30-tokudb-7.0.1-linux-x86_64  tokudb

vi /etc/my_tokudb.cnf
innodb_buffer_pool_size=1G
#tokudb_cache_size=3G    //若加次参数,初始化会报错[ERROR] ./bin/mysqld: unknown variable 'tokudb_cache_size=3G'

# mkdir -p /database/tokudb/data
mkdir -p /database/tokudb/binlog
  mkdir -p /database/tokudb/relaylog
chown -R mysql.mysql /database/tokudb/

cd /usr/local/tokudb
./scripts/mysql_install_db --defaults-file=/etc/my_tokudb.cnf --user=mysql
./bin/mysqld_safe --defaults-file=/etc/my_tokudb.cnf --user=mysql &


# ps aux|grep mysql
mysql     1096  0.3 61.3 8310588 5016748 ?     Sl   Aug07 697:28 /usr/local/mysql-5.5.28-linux2.6-x86_64/bin/mysqld --defaults-file=/etc/my_zabbix.cnf --basedir=/usr/local/mysql-5.5.28-linux2.6-x86_64 --datadir=/database/zabbix/data/ --plugin-dir=/usr/local/mysql-5.5.28-linux2.6-x86_64/lib/plugin --user=mysql --log-error=/database/zabbix/data/zabbix.err --pid-file=/database/zabbix/data/zabbix.pid --socket=/tmp/mysql_zabbix.sock --port=3306        老从库
root     20083  0.0  0.0  63980  1280 pts/4    S    15:14   0:00 /bin/sh ./bin/mysqld_safe --defaults-file=/etc/my_tokudb.cnf --user=mysql
mysql    20982  0.3  4.8 3143960 400444 pts/4  Sl   15:14   0:04 /usr/local/tokudb/bin/mysqld --defaults-file=/etc/my_tokudb.cnf --basedir=/usr/local/tokudb --datadir=/database/tokudb/data/ --plugin-dir=/usr/local/tokudb/lib/mysql/plugin --user=mysql --log-error=/database/tokudb/data/tokudb.err --pid-file=/database/tokudb/data/tokudb.pid --socket=/tmp/mysql_tokudb.sock --port=3307  新从库

3.15 slave
在新从库中 建所需tokudb引擎表(   --port=3307库中
create database zabbix default character set utf8;
CREATE TABLE `history` (
  `itemid` bigint(20) unsigned NOT NULL,
  `clock` int(11) NOT NULL DEFAULT '0',
  `value` double(16,4) NOT NULL DEFAULT '0.0000',
  `ns` int(11) NOT NULL DEFAULT '0',
  primary KEY `history_1` (`itemid`,`clock`),
  KEY `history_2` (`clock`,`itemid`)
) ENGINE=tokudb DEFAULT CHARSET=utf8
partition by range(clock)
(
    partition p201501 VALUES LESS THAN(UNIX_TIMESTAMP('2015-02-01 00:00:00')),
    partition p201502 VALUES LESS THAN(UNIX_TIMESTAMP('2015-03-01 00:00:00')),
    partition p201503 VALUES LESS THAN(UNIX_TIMESTAMP('2015-04-01 00:00:00')),
    partition p201504 VALUES LESS THAN(UNIX_TIMESTAMP('2015-05-01 00:00:00')),
    partition p201505 VALUES LESS THAN(UNIX_TIMESTAMP('2015-06-01 00:00:00')),
    partition p201506 VALUES LESS THAN(UNIX_TIMESTAMP('2015-07-01 00:00:00')),
    partition p201507 VALUES LESS THAN(UNIX_TIMESTAMP('2015-08-01 00:00:00')),
    partition p201508 VALUES LESS THAN(UNIX_TIMESTAMP('2015-09-01 00:00:00')),
    partition p201509 VALUES LESS THAN(UNIX_TIMESTAMP('2015-10-01 00:00:00')),
    partition p201510 VALUES LESS THAN(UNIX_TIMESTAMP('2015-11-01 00:00:00')),
    partition p201511 VALUES LESS THAN(UNIX_TIMESTAMP('2015-12-01 00:00:00')),
    partition p201512 VALUES LESS THAN(UNIX_TIMESTAMP('2016-01-01 00:00:00')),
    partition p201601 VALUES LESS THAN(UNIX_TIMESTAMP('2016-02-01 00:00:00')),
    partition p201602 VALUES LESS THAN(UNIX_TIMESTAMP('2016-03-01 00:00:00')),
    partition p201603 VALUES LESS THAN(UNIX_TIMESTAMP('2016-04-01 00:00:00')),
    partition p201604 VALUES LESS THAN(UNIX_TIMESTAMP('2016-05-01 00:00:00')),
    partition p201605 VALUES LESS THAN(UNIX_TIMESTAMP('2016-06-01 00:00:00')),
    partition p201606 VALUES LESS THAN(UNIX_TIMESTAMP('2016-07-01 00:00:00')),
    partition p201607 VALUES LESS THAN(UNIX_TIMESTAMP('2016-08-01 00:00:00')),
    partition p201608 VALUES LESS THAN(UNIX_TIMESTAMP('2016-09-01 00:00:00')),
    partition p201609 VALUES LESS THAN(UNIX_TIMESTAMP('2016-10-01 00:00:00')),
    partition p201610 VALUES LESS THAN(UNIX_TIMESTAMP('2016-11-01 00:00:00')),
    partition p201611 VALUES LESS THAN(UNIX_TIMESTAMP('2016-12-01 00:00:00')),
    partition p201612 VALUES LESS THAN(UNIX_TIMESTAMP('2017-01-01 00:00:00')),
    partition pmax VALUES LESS THAN MAXVALUE
);

CREATE TABLE `history_uint` (
  `itemid` bigint(20) unsigned NOT NULL,
  `clock` int(11) NOT NULL DEFAULT '0',
  `value` bigint(20) unsigned NOT NULL DEFAULT '0',
  `ns` int(11) NOT NULL DEFAULT '0',
  primary KEY `history_uint_1` (`itemid`,`clock`),
  KEY `history_uint_2` (`clock`,`itemid`)
) ENGINE=tokudb DEFAULT CHARSET=utf8
partition by range(clock)
(
    partition p201501 VALUES LESS THAN(UNIX_TIMESTAMP('2015-02-01 00:00:00')),
    partition p201502 VALUES LESS THAN(UNIX_TIMESTAMP('2015-03-01 00:00:00')),
    partition p201503 VALUES LESS THAN(UNIX_TIMESTAMP('2015-04-01 00:00:00')),
    partition p201504 VALUES LESS THAN(UNIX_TIMESTAMP('2015-05-01 00:00:00')),
    partition p201505 VALUES LESS THAN(UNIX_TIMESTAMP('2015-06-01 00:00:00')),
    partition p201506 VALUES LESS THAN(UNIX_TIMESTAMP('2015-07-01 00:00:00')),
    partition p201507 VALUES LESS THAN(UNIX_TIMESTAMP('2015-08-01 00:00:00')),
    partition p201508 VALUES LESS THAN(UNIX_TIMESTAMP('2015-09-01 00:00:00')),
    partition p201509 VALUES LESS THAN(UNIX_TIMESTAMP('2015-10-01 00:00:00')),
    partition p201510 VALUES LESS THAN(UNIX_TIMESTAMP('2015-11-01 00:00:00')),
    partition p201511 VALUES LESS THAN(UNIX_TIMESTAMP('2015-12-01 00:00:00')),
    partition p201512 VALUES LESS THAN(UNIX_TIMESTAMP('2016-01-01 00:00:00')),
    partition p201601 VALUES LESS THAN(UNIX_TIMESTAMP('2016-02-01 00:00:00')),
    partition p201602 VALUES LESS THAN(UNIX_TIMESTAMP('2016-03-01 00:00:00')),
    partition p201603 VALUES LESS THAN(UNIX_TIMESTAMP('2016-04-01 00:00:00')),
    partition p201604 VALUES LESS THAN(UNIX_TIMESTAMP('2016-05-01 00:00:00')),
    partition p201605 VALUES LESS THAN(UNIX_TIMESTAMP('2016-06-01 00:00:00')),
    partition p201606 VALUES LESS THAN(UNIX_TIMESTAMP('2016-07-01 00:00:00')),
    partition p201607 VALUES LESS THAN(UNIX_TIMESTAMP('2016-08-01 00:00:00')),
    partition p201608 VALUES LESS THAN(UNIX_TIMESTAMP('2016-09-01 00:00:00')),
    partition p201609 VALUES LESS THAN(UNIX_TIMESTAMP('2016-10-01 00:00:00')),
    partition p201610 VALUES LESS THAN(UNIX_TIMESTAMP('2016-11-01 00:00:00')),
    partition p201611 VALUES LESS THAN(UNIX_TIMESTAMP('2016-12-01 00:00:00')),
    partition p201612 VALUES LESS THAN(UNIX_TIMESTAMP('2017-01-01 00:00:00')),
    partition pmax VALUES LESS THAN MAXVALUE
);


CREATE TABLE `history_text` (
  `id` bigint(20) unsigned NOT NULL,
  `itemid` bigint(20) unsigned NOT NULL,
  `clock` int(11) NOT NULL DEFAULT '0',
  `value` text NOT NULL,
  `ns` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`,clock),
  UNIQUE KEY `history_text_2` (`itemid`,`id`,clock),
  KEY `history_text_1` (`itemid`,`clock`),
  KEY `history_text_3` (`clock`,`itemid`)
) ENGINE=tokudb DEFAULT CHARSET=utf8
partition by range(clock)
(
    partition p201501 VALUES LESS THAN(UNIX_TIMESTAMP('2015-02-01 00:00:00')),
    partition p201502 VALUES LESS THAN(UNIX_TIMESTAMP('2015-03-01 00:00:00')),
    partition p201503 VALUES LESS THAN(UNIX_TIMESTAMP('2015-04-01 00:00:00')),
    partition p201504 VALUES LESS THAN(UNIX_TIMESTAMP('2015-05-01 00:00:00')),
    partition p201505 VALUES LESS THAN(UNIX_TIMESTAMP('2015-06-01 00:00:00')),
    partition p201506 VALUES LESS THAN(UNIX_TIMESTAMP('2015-07-01 00:00:00')),
    partition p201507 VALUES LESS THAN(UNIX_TIMESTAMP('2015-08-01 00:00:00')),
    partition p201508 VALUES LESS THAN(UNIX_TIMESTAMP('2015-09-01 00:00:00')),
    partition p201509 VALUES LESS THAN(UNIX_TIMESTAMP('2015-10-01 00:00:00')),
    partition p201510 VALUES LESS THAN(UNIX_TIMESTAMP('2015-11-01 00:00:00')),
    partition p201511 VALUES LESS THAN(UNIX_TIMESTAMP('2015-12-01 00:00:00')),
    partition p201512 VALUES LESS THAN(UNIX_TIMESTAMP('2016-01-01 00:00:00')),
    partition p201601 VALUES LESS THAN(UNIX_TIMESTAMP('2016-02-01 00:00:00')),
    partition p201602 VALUES LESS THAN(UNIX_TIMESTAMP('2016-03-01 00:00:00')),
    partition p201603 VALUES LESS THAN(UNIX_TIMESTAMP('2016-04-01 00:00:00')),
    partition p201604 VALUES LESS THAN(UNIX_TIMESTAMP('2016-05-01 00:00:00')),
    partition p201605 VALUES LESS THAN(UNIX_TIMESTAMP('2016-06-01 00:00:00')),
    partition p201606 VALUES LESS THAN(UNIX_TIMESTAMP('2016-07-01 00:00:00')),
    partition p201607 VALUES LESS THAN(UNIX_TIMESTAMP('2016-08-01 00:00:00')),
    partition p201608 VALUES LESS THAN(UNIX_TIMESTAMP('2016-09-01 00:00:00')),
    partition p201609 VALUES LESS THAN(UNIX_TIMESTAMP('2016-10-01 00:00:00')),
    partition p201610 VALUES LESS THAN(UNIX_TIMESTAMP('2016-11-01 00:00:00')),
    partition p201611 VALUES LESS THAN(UNIX_TIMESTAMP('2016-12-01 00:00:00')),
    partition p201612 VALUES LESS THAN(UNIX_TIMESTAMP('2017-01-01 00:00:00')),
    partition pmax VALUES LESS THAN MAXVALUE
);
CREATE TABLE `trends` (
  `itemid` bigint(20) unsigned NOT NULL,
  `clock` int(11) NOT NULL DEFAULT '0',
  `num` int(11) NOT NULL DEFAULT '0',
  `value_min` double(16,4) NOT NULL DEFAULT '0.0000',
  `value_avg` double(16,4) NOT NULL DEFAULT '0.0000',
  `value_max` double(16,4) NOT NULL DEFAULT '0.0000',
  PRIMARY KEY (`itemid`,`clock`)
) ENGINE=tokudb DEFAULT CHARSET=utf8
partition by range(clock)
(
    partition p201501 VALUES LESS THAN(UNIX_TIMESTAMP('2015-02-01 00:00:00')),
    partition p201502 VALUES LESS THAN(UNIX_TIMESTAMP('2015-03-01 00:00:00')),
    partition p201503 VALUES LESS THAN(UNIX_TIMESTAMP('2015-04-01 00:00:00')),
    partition p201504 VALUES LESS THAN(UNIX_TIMESTAMP('2015-05-01 00:00:00')),
    partition p201505 VALUES LESS THAN(UNIX_TIMESTAMP('2015-06-01 00:00:00')),
    partition p201506 VALUES LESS THAN(UNIX_TIMESTAMP('2015-07-01 00:00:00')),
    partition p201507 VALUES LESS THAN(UNIX_TIMESTAMP('2015-08-01 00:00:00')),
    partition p201508 VALUES LESS THAN(UNIX_TIMESTAMP('2015-09-01 00:00:00')),
    partition p201509 VALUES LESS THAN(UNIX_TIMESTAMP('2015-10-01 00:00:00')),
    partition p201510 VALUES LESS THAN(UNIX_TIMESTAMP('2015-11-01 00:00:00')),
    partition p201511 VALUES LESS THAN(UNIX_TIMESTAMP('2015-12-01 00:00:00')),
    partition p201512 VALUES LESS THAN(UNIX_TIMESTAMP('2016-01-01 00:00:00')),
    partition p201601 VALUES LESS THAN(UNIX_TIMESTAMP('2016-02-01 00:00:00')),
    partition p201602 VALUES LESS THAN(UNIX_TIMESTAMP('2016-03-01 00:00:00')),
    partition p201603 VALUES LESS THAN(UNIX_TIMESTAMP('2016-04-01 00:00:00')),
    partition p201604 VALUES LESS THAN(UNIX_TIMESTAMP('2016-05-01 00:00:00')),
    partition p201605 VALUES LESS THAN(UNIX_TIMESTAMP('2016-06-01 00:00:00')),
    partition p201606 VALUES LESS THAN(UNIX_TIMESTAMP('2016-07-01 00:00:00')),
    partition p201607 VALUES LESS THAN(UNIX_TIMESTAMP('2016-08-01 00:00:00')),
    partition p201608 VALUES LESS THAN(UNIX_TIMESTAMP('2016-09-01 00:00:00')),
    partition p201609 VALUES LESS THAN(UNIX_TIMESTAMP('2016-10-01 00:00:00')),
    partition p201610 VALUES LESS THAN(UNIX_TIMESTAMP('2016-11-01 00:00:00')),
    partition p201611 VALUES LESS THAN(UNIX_TIMESTAMP('2016-12-01 00:00:00')),
    partition p201612 VALUES LESS THAN(UNIX_TIMESTAMP('2017-01-01 00:00:00')),
    partition pmax VALUES LESS THAN MAXVALUE
);
CREATE TABLE `trends_uint` (
  `itemid` bigint(20) unsigned NOT NULL,
  `clock` int(11) NOT NULL DEFAULT '0',
  `num` int(11) NOT NULL DEFAULT '0',
  `value_min` bigint(20) unsigned NOT NULL DEFAULT '0',
  `value_avg` bigint(20) unsigned NOT NULL DEFAULT '0',
  `value_max` bigint(20) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`itemid`,`clock`)
) ENGINE=tokudb DEFAULT CHARSET=utf8
partition by range(clock)
(
    partition p201501 VALUES LESS THAN(UNIX_TIMESTAMP('2015-02-01 00:00:00')),
    partition p201502 VALUES LESS THAN(UNIX_TIMESTAMP('2015-03-01 00:00:00')),
    partition p201503 VALUES LESS THAN(UNIX_TIMESTAMP('2015-04-01 00:00:00')),
    partition p201504 VALUES LESS THAN(UNIX_TIMESTAMP('2015-05-01 00:00:00')),
    partition p201505 VALUES LESS THAN(UNIX_TIMESTAMP('2015-06-01 00:00:00')),
    partition p201506 VALUES LESS THAN(UNIX_TIMESTAMP('2015-07-01 00:00:00')),
    partition p201507 VALUES LESS THAN(UNIX_TIMESTAMP('2015-08-01 00:00:00')),
    partition p201508 VALUES LESS THAN(UNIX_TIMESTAMP('2015-09-01 00:00:00')),
    partition p201509 VALUES LESS THAN(UNIX_TIMESTAMP('2015-10-01 00:00:00')),
    partition p201510 VALUES LESS THAN(UNIX_TIMESTAMP('2015-11-01 00:00:00')),
    partition p201511 VALUES LESS THAN(UNIX_TIMESTAMP('2015-12-01 00:00:00')),
    partition p201512 VALUES LESS THAN(UNIX_TIMESTAMP('2016-01-01 00:00:00')),
    partition p201601 VALUES LESS THAN(UNIX_TIMESTAMP('2016-02-01 00:00:00')),
    partition p201602 VALUES LESS THAN(UNIX_TIMESTAMP('2016-03-01 00:00:00')),
    partition p201603 VALUES LESS THAN(UNIX_TIMESTAMP('2016-04-01 00:00:00')),
    partition p201604 VALUES LESS THAN(UNIX_TIMESTAMP('2016-05-01 00:00:00')),
    partition p201605 VALUES LESS THAN(UNIX_TIMESTAMP('2016-06-01 00:00:00')),
    partition p201606 VALUES LESS THAN(UNIX_TIMESTAMP('2016-07-01 00:00:00')),
    partition p201607 VALUES LESS THAN(UNIX_TIMESTAMP('2016-08-01 00:00:00')),
    partition p201608 VALUES LESS THAN(UNIX_TIMESTAMP('2016-09-01 00:00:00')),
    partition p201609 VALUES LESS THAN(UNIX_TIMESTAMP('2016-10-01 00:00:00')),
    partition p201610 VALUES LESS THAN(UNIX_TIMESTAMP('2016-11-01 00:00:00')),
    partition p201611 VALUES LESS THAN(UNIX_TIMESTAMP('2016-12-01 00:00:00')),
    partition p201612 VALUES LESS THAN(UNIX_TIMESTAMP('2017-01-01 00:00:00')),
    partition pmax VALUES LESS THAN MAXVALUE
)
973559273
973632484
3.15
老从库port3306
mysql> stop  slave;
Query OK, 0 rows affected (0.05 sec)

记点:
mysql> show slave status\G;
*************************** 1. row ***************************
               Slave_IO_State:
                  Master_Host: 10.1.3.14
                  Master_User: replic
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: zabbix-bin.000018
          Read_Master_Log_Pos: 973712604


3.15从库
二、将老库中的数据导入新库

把老库中的非tokudb引擎表导入到新库
--socket=/tmp/mysql_zabbix.sock --port=3306导出
./bin/mysqldump -ubohai -p -S /tmp/mysql_zabbix.sock  -P3306 -R -E --default-character-set=utf8  --databases zabbix --ignore-table=zabbix.history --ignore-table=zabbix.history_uint --ignore-table=zabbix.history_text --ignore-table=zabbix.trends --ignore-table=zabbix.trends_uint >/tmp/bo_zabbix_dict.sql

3.15 tokudb
导入3307
mysql -uroot -p -S /tmp/mysql_tokudb.sock --default-character-set=utf8 zabbix


3.15 从库
将老库中的表 history history_uint history_text trends trends_uint 导入到新库中
从老库中导出
./bin/mysqldump -ubohai -p -S /tmp/mysql_zabbix.sock  -P3306 -R -E -t --default-character-set=utf8  zabbix history history_uint history_text trends trends_uint  >/tmp/bo_history1.sql
-t 很重要 不能少

导入新库
mysql -uroot -p -S /tmp/mysql_tokudb.sock --default-character-set=utf8 zabbix

此时,从库已经改造完毕,搭建新的复制关系
3.14master  ---->3.15slave
3306      3307

搭建主从
3.14
grant replication slave,file on *.* to 'replicuser'@'10.1.3.15' identified by 'repli';
3.15 tokudb
change master to master_host='10.1.3.14', master_user='replicuser', master_password='repli', master_log_file='zabbix-bin.000018', master_log_pos=973712604, master_port=3306;


=======
切应用: 从主库3.14 3306切换到从库3.15 3307

停应用
3.14 3306
mysql> show master status;
+-------------------+-----------+--------------+------------------+
| File              | Position  | Binlog_Do_DB | Binlog_Ignore_DB |
+-------------------+-----------+--------------+------------------+
| zabbix-bin.000019 | 395026382 |              | mysql            |
+-------------------+-----------+--------------+------------------+
1 row in set (0.00 sec)

select count(*) from history;  
24695971

3.15 3307
mysql> show slave status\G;
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 10.1.3.14
                  Master_User: replicuser
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: zabbix-bin.000019
          Read_Master_Log_Pos: 395026382

mysql> select count(*) from history;
24695971

切应用
24682896-->24696354-->24697523



改造3.14主库,直接将从库改造后的tokudb数据库打包拷贝 ,停机拷贝

3.14 安装tokudb数据库
建库
# pwd
/database/tokudb/data
# rm -rf *

3.15   3307
关闭DB   mysqladmin -uroot -p -S /tmp/mysql_tokudb.sock shutdown
cd /database/tokudb/data
  scp -rp *  [email protected]:/database/tokudb/data/
# chown -R mysql.mysql /database/tokudb/

3.14
# cd /usr/local/tokudb/
[ [email protected] ix tokudb]# ./bin/mysqld_safe --defaults-file=/etc/my_tokudb.cnf --user=mysql &


mysql> show master status;
+-------------------+----------+--------------+------------------+
| File              | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+-------------------+----------+--------------+------------------+
| tokudb_bin.000004 |      107 |              | mysql            |
+-------------------+----------+--------------+------------------+
1 row in set (0.00 sec)

24691650--->24693006--24693828

3.15
mysql> select * from history limit 24695971,10;
+------------------+------------+---------+-----------+
| itemid           | clock      | value   | ns        |
+------------------+------------+---------+-----------+
| 2102100000025959 | 1451049879 | 99.9445 | 949830000 |
| 2102100000025959 | 1451049939 | 99.9424 | 823648000 |
| 2102100000025959 | 1451049999 | 99.9452 | 538378000 |
| 2102100000025959 | 1451050059 | 99.9438 | 175785000 |
| 2102100000025959 | 1451050119 | 99.9098 | 733466000 |
| 2102100000025959 | 1451050179 | 99.8987 | 337558000 |
| 2102100000025959 | 1451050239 | 99.9425 | 948463000 |
| 2102100000025959 | 1451050299 | 99.9445 | 743020000 |
| 2102100000025959 | 1451050359 | 99.9417 | 487400000 |
| 2102100000025959 | 1451050419 | 99.9445 | 142466000 |
+------------------+------------+---------+-----------+
10 rows in set (7.34 sec)

3.14
mysql> select * from history limit 24695971,10;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    99
Current database: zabbix

+------------------+------------+--------+-----------+
| itemid           | clock      | value  | ns        |
+------------------+------------+--------+-----------+
| 2102100000025962 | 1451193702 | 0.0243 | 232583000 |
| 2102100000025962 | 1451193762 | 0.0257 |  59246000 |
| 2102100000025962 | 1451193822 | 0.0236 | 192198000 |
| 2102100000025962 | 1451193882 | 0.0263 | 308544000 |
| 2102100000025962 | 1451193942 | 0.0263 | 783732000 |
| 2102100000025962 | 1451194002 | 0.0243 | 607910000 |
| 2102100000025962 | 1451194062 | 0.0236 | 466199000 |
| 2102100000025962 | 1451194122 | 0.0250 | 195488000 |
| 2102100000025962 | 1451194182 | 0.0250 | 486322000 |
| 2102100000025962 | 1451194242 | 0.0520 |  29187000 |
+------------------+------------+--------+-----------+
10 rows in set (9.36 sec)

3.14
grant replication slave,file on *.* to 'replicuser'@'10.1.3.15' identified by 'replic@focus';
3.15 tokudb
change master to master_host='10.1.3.14', master_user='replicuser', master_password='replic', master_log_file='tokudb_bin.000004', master_log_pos=107, master_port=3307;









你可能感兴趣的:(MySQL)