- Go to Customize -> "Manage Changes" tab
- Select the drop down menu in the right top corner
- Click "Add/Edit New Custom SQL Object"
- Click "Add New CSO"
- In "Name" enter
Multisource_1
- In "SQL Query" enter
SHOW SLAVE 'db1' STATUS
- In "Key columns" enter
Seconds_Behind_Master,Slave_SQL_Running
- In "Servers" enter the server list to which this multisource connection applies, or leave empty if it applies to all servers
- Click on "Save" at the bottom
- Go to Monitors -> Replication
This file contains hidden or 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] | |
binlog_format=ROW | |
innodb_buffer_pool_size=64M | |
innodb_autoinc_lock_mode=2 | |
innodb_flush_log_at_trx_commit=2 | |
bind-address=0.0.0.0 | |
#galera settings | |
wsrep_provider=/usr/lib64/galera/libgalera_smm.so | |
wsrep_cluster_name="my_wsrep_cluster" | |
wsrep_cluster_address=gcomm://192.168.50.101,192.168.50.102,192.168.50.103 |
This file contains hidden or 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
sysbench \ | |
--test=/usr/share/doc/sysbench/tests/db/oltp.lua \ | |
--mysql-host=localhost \ | |
--mysql-port=3306 \ | |
--mysql-user=root \ | |
--mysql-password=admin \ | |
--mysql-db=test \ | |
--mysql-table-engine=innodb \ | |
--mysql-ignore-errors=all \ | |
--oltp-test-mode=complex \ |
This file contains hidden or 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/bash | |
if [ -z $1 ] | |
then | |
echo "example usage: $(basename $0) 20150401 20150530" | |
exit 1 | |
fi | |
date=$1 | |
while true | |
do | |
echo $date |
This file contains hidden or 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 ( | |
// "bytes" | |
"bufio" | |
_ "database/sql" | |
"fmt" | |
_ "github.com/go-sql-driver/mysql" | |
"github.com/jmoiron/sqlx" | |
"github.com/tanji/mariadb-tools/dbhelper" |
This file contains hidden or 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
- hosts: lab | |
user: root | |
tasks: | |
- name: download couchbase package | |
get_url: url=http://packages.couchbase.com/releases/3.0.1/couchbase-server-enterprise_3.0.1-debian7_amd64.deb dest=/tmp/ | |
- name: install couchbase package | |
apt: deb=/tmp/couchbase-server-enterprise_3.0.1-debian7_amd64.deb | |
- name: create couchbase datadir | |
file: path=/data/couchbase owner=couchbase group=couchbase state=directory |
This file contains hidden or 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/bash | |
TODAY=$(date +%Y%m%d) | |
DOW=$(date +%w) | |
# check if sshfs is mounted. if not, do it | |
mount -f /mnt/backup | |
if [ $? -eq 0 ] | |
then | |
mount /mnt/backup | |
fi | |
mysql --password=foo! -e "set global wsrep_desync=ON" |
NewerOlder