随笔分类 -  database

数据库
摘要:#install on centos7.* setup1: yum -y install libleveldb-dev libleveldb1 nodejs-legacy npm setup2: yum groupinstall 'Development Tools' setup3: npm ins 阅读全文
posted @ 2017-04-19 15:32 nbuntu牛班图 阅读(248) 评论(0) 推荐(0)
摘要:mysql主从同步失败 slave: #查看同步状态 mysql> show slave status \G; Slave_IO_Running: Yes Slave_SQL_Running: No Last_Errno: 1062 Last_Error: Error 'Duplicate entr 阅读全文
posted @ 2016-07-26 14:40 nbuntu牛班图 阅读(1610) 评论(0) 推荐(0)
摘要:一、系统优化 1.禁用linux内核THP透明大页 WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issu 阅读全文
posted @ 2016-07-22 15:07 nbuntu牛班图 阅读(382) 评论(0) 推荐(0)
摘要:第一篇:SQL优化 声明:本学习笔记是拜读“深入浅出MySQL数据库开发、优化与维护管理 第2版 唐汉明等著” 推荐大家购买阅读。 任何转转或引用等请注明书籍。 一、优化SQL的一般步骤 1.通过show [session|globa]lstatus命令了解各种SQL的执行频率。 默认session 阅读全文
posted @ 2016-07-13 17:33 nbuntu牛班图 阅读(570) 评论(0) 推荐(1)
摘要:在ndb上可以建立两种类型的表: 1、内存表:所有数据(包括index)都在内存中。同时会在磁盘上保存数据,因此不用担心数据会丢失,datanode会在启动的时候把数据加载到内存。 2、磁盘表:仅主键、索引字段保存在内存中,其他字段保存在磁盘文件里。-- MySQL 5.7 CLUSTER NDB 阅读全文
posted @ 2016-06-13 11:54 nbuntu牛班图 阅读(659) 评论(0) 推荐(0)
摘要:select concat('alter table ',table_schema,'.',table_name,' ENGINE=NDBCLUSTER;') from information_schema.TABLES where table_schema in (select schema_na 阅读全文
posted @ 2016-06-12 14:57 nbuntu牛班图 阅读(220) 评论(0) 推荐(0)
摘要:转载来自http://blog.csdn.net/ghsau。 MySQL从5.5升级到5.6,TIMESTAMP的变化 TIMESTAMP在MySQL5.5中的行为 第一个未设置默认值的TIMESTAMP NOT NULL字段隐式默认值: CURRENT_TIMESTAMP ON UPDATE C 阅读全文
posted @ 2016-06-12 11:10 nbuntu牛班图 阅读(252) 评论(0) 推荐(0)
摘要:Centos Install Mysql Cluster Cluster nodes and host computers. Node IP Address Management node (mgmd) 10.1.10.50 SQL node (mysqld) 10.1.10.51 Data nod 阅读全文
posted @ 2016-06-07 17:16 nbuntu牛班图 阅读(917) 评论(0) 推荐(0)
摘要:MySQL主从切换手册 Master-Slave架构 运维部 V1.0 2016年 05月 24 日 正常切换 在开始切换之前先对主库进行锁表: flush tables with read lock (在执行完成后生产环境必须等待所有语句执行完成) 在flush tables with read 阅读全文
posted @ 2016-05-24 14:36 nbuntu牛班图 阅读(18905) 评论(6) 推荐(0)
摘要:Author:牛班图 Date:2016/05/19 Address:suzhou mysql5.5的版本之后支持半同步复制:需要安装主库插件 rpl_semi_sync_master 从库插件rpl_semi_sync_salve;半同步的意思就是主库再提交事务之前先确认至少有一个slave已收到 阅读全文
posted @ 2016-05-19 10:52 nbuntu牛班图 阅读(153) 评论(0) 推荐(0)
摘要:Author:牛班图 Date:2016/05/17 Address:suzhou 本文部分知识来自于mysql官网:http://dev.mysql.com 在开始之前,先向大家推荐一下mysql的MySQL Fabric是oracle官方原生的MySQL HA及分片的中间件,已经被移到mysql 阅读全文
posted @ 2016-05-18 17:34 nbuntu牛班图 阅读(236) 评论(0) 推荐(0)