This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
datadir = /var/lib/mysql | |
query_cache_size=0 | |
query_cache_type=0 | |
binlog_format = ROW | |
innodb_buffer_pool_size = 128M | |
#^^ or however much you can allocate to MySQL on this machien |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vrrp_script chk_pxc { | |
script "/usr/bin/clustercheck" | |
interval 1 | |
} | |
vrrp_instance PXC { | |
state MASTER | |
interface eth1 | |
virtual_router_id 51 | |
priority 100 | |
nopreempt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To Install: (requires EPEL) | |
// yum install nodejs nodejs-async -y | |
// To start: | |
// export NODE_PATH=/usr/lib/node_modules/ | |
// screen node scoreboard.js | |
var http = require('http'); | |
var async = require('async'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "perconajayj/centos-x86_64" | |
config.vm.provider :aws do |aws, override| | |
aws.instance_type = 'm1.small' | |
aws.region = 'us-east-1' | |
aws.access_key_id = "YOUR KEY" | |
aws.secret_access_key = "YOUR SECRET KEY" | |
aws.keypair_name = "KEYPAIR NAME" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 local2 | |
chroot /var/lib/haproxy | |
pidfile /var/run/haproxy.pid | |
maxconn 4000 | |
user haproxy | |
group haproxy | |
daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select engine, table_schema, table_name from information_schema.TABLES | |
WHERE table_schema NOT IN ('performance_schema','information_schema','mysql') | |
and engine != 'Innodb'; | |
select table_schema, engine, count(*) as non_innodb_tables from information_schema.TABLES where table_schema NOT IN ('performance_schema','information_schema','mysql') | |
and engine != 'Innodb' group by table_schema, engine with rollup; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[maxscale] | |
threads=4 | |
[PXC Monitor] | |
type=monitor | |
module=galeramon | |
servers=node1,node2,node3 | |
user=maxscale | |
passwd=maxscale | |
monitor_interval=1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "github.com/riobard/go-mmap" | |
import "fmt" | |
import "os" | |
func main() { | |
file, err := os.Open( "/gcache/galera.cache") | |
if err != nil { | |
panic( err ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
HOST=$1 | |
cd /var/lib/denyhosts | |
for i in `ls`; do mv $i $i.old; grep -v $HOST $i.old >> $i; done | |
cp /etc/hosts.deny /tmp/hosts.deny | |
grep -v $HOST /tmp/hosts.deny > /etc/hosts.deny |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// connection manager object is responsible for maintaining the connection to zk | |
var connection_manager = (function() { | |
var cm = {}; | |
// Start connection immediately (global for all instances) | |
var zk_trying = false; | |
var zkclass; | |
var zk; | |
// tries to make a connection (if one isn't already being attempted), waits for timeout |
OlderNewer