Welcome to SpicePress Theme

Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.

What we Offer?

Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.

Easy to Use

Phasellus facilisis, nunc in lacinia auctor, eros lacus aliquet velit, quis lobortis risus nunc nec nisi maecans et turpis vitae velit.volutpat porttitor a sit amet est. In eu rutrum ante. Nullam id lorem fermentum, accumsan enim non auctor neque.

Multi-Purpose

Phasellus facilisis, nunc in lacinia auctor, eros lacus aliquet velit, quis lobortis risus nunc nec nisi maecans et turpis vitae velit.volutpat porttitor a sit amet est. In eu rutrum ante. Nullam id lorem fermentum, accumsan enim non auctor neque.

Responsive Design

Phasellus facilisis, nunc in lacinia auctor, eros lacus aliquet velit, quis lobortis risus nunc nec nisi maecans et turpis vitae velit.volutpat porttitor a sit amet est. In eu rutrum ante. Nullam id lorem fermentum, accumsan enim non auctor neque.

Our Portfolio

Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.

What People Say

Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.

img

Sed ut Perspiciatis Unde Omnis Iste Sed ut perspiciatis unde omnis iste natu error sit voluptatem accu tium neque fermentum veposu miten a tempor nise. Duis autem vel eum iriure dolor in hendrerit in vulputate velit consequat reprehender in voluptate velit esse cillum duis dolor fugiat nulla pariatur.

Alice Culan - UI Developer

最新消息

Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.

mysql Yearning install

安装docker编排工具compose:

[root@localhost ~]# yum install docker-compose

安装git

[root@localhost ~]# yum install git

下载Yearning

[root@localhost ~]# git clone https://github.com/cookieY/Yearning.git

安装Yearning

说明:compose会将启动两个容器,一个为Yearning服务的容器,一个为mysql的服务容器,两个容器进行交互

[root@localhost ~]# cd /root/Yearning/install/yearning-docker-compose 

[root@localhost yearning-docker-compose]# docker-compose up -d

查看容器

查看监听地址:

访问平台地址

http://IP:8080

Percona Install TokuDB

介绍

TokuDB是一个insert高性能、支持事务处理的存储引擎。TokuDB的主要特点是密集压缩,支持事务。MVCC多版本并发控制,聚集索引(主键),并且支持在线DDL操作,可以把它看做是ARCHIVE存储引擎的升级版。MariaDB和Percona都捆绑了TokuDB引擎,TokuDB使用了ZLIB和TokuDB压缩算法
注意:TokuDB不支持热备份,只能冷备份

特性:

性能测试报告:

安装:

1、查看是否支持tokudb引擎

2、设置系统内核参数

关闭Readhat系统的内核Transparent HugePage
echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
关闭Centos系统的内核Transparent HugePage
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
将其加入/etc/rc.local文件中,以便重启后自动生效

3、安装TokuDB:

3.1、安装yum源:

[root@localhost ~]# yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm

3.2、查看是否存在TokuDB软件包:

[root@localhost ~] yum list | grep Percona-Server-tokudb

3.3、开始安装TokuDB引擎:

[root@localhost ~]# yum install Percona-Server-tokudb-57.x86_64

4、开启TokuDB引擎:

4.1、使用ps_tokudb_admin脚本进行安装

[root@localhost ~]# ps_tokudb_admin –enable -uroot -p
使用脚本后输出的内容

4.2、重启服务并再次执行

[root@localhost ~]# systemctl restart mysqld.service

[root@localhost ~]# ps_tokudb_admin –enable -uroot -p

4.3、查看TokuDB安装是否成功:

5、修改库的默认引擎:

5.1、设置临时默认存储引擎:

mysql> set global default_storage_engine=TokuDB;

5.2、设置永久默认存储引擎:

[root@localhost ~]# vi /etc/my.cnf
default_storage_engine=TokuDB

5.3、重启服务器然后查看默认存储引擎:

mysql> show variables like ‘%default_storage%’;
+————————+——–+
| Variable_name | Value |
+————————+——–+
| default_storage_engine | TokuDB |
+————————+——–+
1 row in set (0.01 sec)

6、验证innodb存储引擎的表转换为TokuDB是否有问题:

6.1、首先查看表的存储引擎:

mysql> show create table error_log;
error_log | CREATE TABLE error_log (
error_id bigint(20) NOT NULL AUTO_INCREMENT COMMENT ‘日志ID’,
operator_id bigint(20) DEFAULT NULL COMMENT ‘操作人ID’,
operation varchar(30) DEFAULT NULL COMMENT ‘操作’,
operator_ip varchar(50) DEFAULT NULL COMMENT ‘操作人IP’,
exception_time datetime DEFAULT NULL COMMENT ‘异常产生时间’,
error_message varchar(500) DEFAULT NULL COMMENT ‘异常消息’,
operator_type int(11) DEFAULT NULL COMMENT ‘操作人类型(1:管理员3:会员)’,
PRIMARY KEY (error_id) USING BTREE,
KEY Index_error_time (exception_time) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=134308 DEFAULT CHARSET=utf8 COMMENT=’系统日志’

6.2、修改表存储引擎

mysql> alter table error_log TokuDB;

6.3、再次查看表的存储引擎

mysql> show create table error_log;
error_log | CREATE TABLE error_log (
error_id bigint(20) NOT NULL AUTO_INCREMENT COMMENT ‘日志ID’,
operator_id bigint(20) DEFAULT NULL COMMENT ‘操作人ID’,
operation varchar(30) DEFAULT NULL COMMENT ‘操作’,
operator_ip varchar(50) DEFAULT NULL COMMENT ‘操作人IP’,
exception_time datetime DEFAULT NULL COMMENT ‘异常产生时间’,
error_message varchar(500) DEFAULT NULL COMMENT ‘异常消息’,
operator_type int(11) DEFAULT NULL COMMENT ‘操作人类型(1:管理员3:会员)’,
PRIMARY KEY (error_id) USING BTREE,
KEY Index_error_time (exception_time) USING BTREE
) ENGINE=TokuDB AUTO_INCREMENT=134308 DEFAULT CHARSET=utf8 COMMENT=’系统日志’

7、TokuDB搭建主从:

7.1、说明:使用TokuDB存储引擎的主从同步跟InnoDB引擎是一样的

7. 2、主库配置:

7.2.1 、/etc/my.cnf增加binlog日志,开启GTID复制模式
server-id=174
log-bin=/var/lib/mysql/mysql-bin
binlog_format=row
max-binlog_size=1024M
binlog_cache_size=2M
expire_logs_days=15
gtid_mode=ON
enforce_gtid_consistency=ON
7.2.2、创建同步账号:
mysql> GRANT REPLICATION SLAVE ON . to ‘tokudb_repl’@’10.%.%.%’ identified by ‘password’;
7.2.3、防火墙开放3306端口

7.3、丛库配置:

7.3.1、/etc/my.cnf增加binlog日志,开启GTID复制模式
server-id=177
log-bin=/var/lib/mysql/mysql-bin
binlog_format=row
max-binlog_size=1024M
binlog_cache_size=2M
expire_logs_days=15
gtid_mode=ON
enforce_gtid_consistency=ON
7.3.2、使用命令开始同步主库数据:
mysql> change master to master_host=’主库_IP’,master_user=’同步账号’,master_password=’密码’,master_port=3306,master_auto_position=1;
7.3.3、查看是否正常同步
mysql> show slave status\G;