摘要: #!/usr/bin/env python# -*- coding: utf-8 -*-import os,sysimport socketimport reimport socketimport commandsimport json,timeimport smtplibimport loggin 阅读全文
posted @ 2017-11-20 14:06 Mr.Eric 阅读(213) 评论(0) 推荐(0) 编辑
摘要: pt-online-schema-change 用于在线不锁表改表结构, 例如修改表从myisam到innodb 或增加字段 stop slave;set global sql_slave_skip_counter=1;start slave; 在出现重复数据导致复制停止时,在自己已知具体重复的是什 阅读全文
posted @ 2017-03-26 21:51 Mr.Eric 阅读(124) 评论(0) 推荐(0) 编辑
摘要: https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html 非innodb参数设置: 1.key_buffer_size=16M 这个参数针对myisam作用很大,主要用来缓存myi索引文件,一般设置16M,myisqm可 阅读全文
posted @ 2017-03-26 13:15 Mr.Eric 阅读(273) 评论(0) 推荐(0) 编辑
摘要: mysql添加mcafee 审计插件 插件源码地址https://github.com/mcafee/mysql-audit插件安装方法https://github.com/mcafee/mysql-audit/wiki/Installation插件下载地址https://bintray.com/m 阅读全文
posted @ 2017-03-22 19:45 Mr.Eric 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 1.grant replication slave,replication client on *.* to 'repli_user'@'192.168.0.5' identified by 'testpassword' 2.配置主库(log-bin,server-id,expire_logs_da 阅读全文
posted @ 2017-03-19 21:30 Mr.Eric 阅读(767) 评论(0) 推荐(0) 编辑
摘要: MYSQL性能调优: 对聚簇索引和非聚簇索引的认识 时间 2017-03-17 19:25:22 原文 http://pottievil.com/mysql语句调优-对聚簇索引和非聚簇索引的认识/ 主题 MySQL 时间 2017-03-17 19:25:22 原文 http://pottievil 阅读全文
posted @ 2017-03-17 19:39 Mr.Eric 阅读(483) 评论(0) 推荐(0) 编辑
摘要: MySQL InnoDB的存储结构总结 从物理意义上来讲,InnoDB表由共享表空间、日志文件组(redo文件组)、表结构定义文件组成。若将innodb_file_per_table设置为on,则系统将为每一个表单独的生成一个table_name.ibd的文件,在此文件中,存储与该表相关的数据、索引 阅读全文
posted @ 2017-03-17 14:32 Mr.Eric 阅读(449) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-03-11 12:09 Mr.Eric 阅读(734) 评论(0) 推荐(0) 编辑
摘要: 一、创建删除主建索引 1.在创建表时就创建好索引 CREATE TABLE `student` ( `id` int(4) NOT NULL AUTO_INCREMENT, `name` char(20) NOT NULL, `age` tinyint(2) NOT NULL DEFAULT '0' 阅读全文
posted @ 2017-03-08 16:41 Mr.Eric 阅读(34191) 评论(0) 推荐(1) 编辑
摘要: 1. mysqladmin -uroot -p'456' -S /data/3307/mysql.sock password '123'; 注:刚用mysql_db_install初始完没有密码时用类似语句设置密码 mysqladmin -uroot -S /data/3307/mysql.sock 阅读全文
posted @ 2017-03-04 18:38 Mr.Eric 阅读(231) 评论(0) 推荐(0) 编辑