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
#!/usr/bin/env mysqlsh --file | |
import os | |
import sys | |
import time | |
import json | |
import argparse | |
import datetime | |
import socket | |
import signal | |
from pathlib import Path |
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
#!/usr/bin/env python3 | |
# 无论单主或多主配置双向复制必须启用skip_replica_start,否则可能导致节点启动后加入集群前先同步到对方集群数据导致和本组gtid不一致无法加入集群 | |
# 单主不建议做双向复制,最好用mysql-shell部署clusterset架构,利用mysqlrouter 实现两集群双活 | |
# 多主模式可以开双向复制。 | |
from typing import List, Dict, Literal | |
import subprocess | |
import time | |
from dataclasses import dataclass |
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
# git clone https://github.com/CVEProject/cvelistV5.git | |
#!/bin/bash | |
# usage: ./analyze_mysql_cve.sh 8.0.32 | |
TARGET_VERSION="$1" | |
duckdb <<EOF | |
CREATE TABLE IF NOT EXISTS mysqlcve AS |
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 | |
persist_tool='mpathpersist' | |
register() { | |
local key=$1 | |
local disk=$2 | |
echo "register:$disk " | |
$persist_tool -o -I -S $key -d $disk | |
} | |
unregister() { |
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
#!/usr/bin/env python3 | |
import json | |
import sys | |
# not support list partition type | |
# only support default Btree index, no other index types tested | |
# only gb* latin1 utf8mb3 utf8mb4 | |
char_collate = { | |
248:["gb18030","gb18030_chinese_ci"],249:["gb18030","gb18030_bin"],250:["gb18030","gb18030_unicode_520_ci"],24:["gb2312","gb2312_chinese_ci"],86:["gb2312","gb2312_bin"],28:["gbk","gbk_chinese_ci"],87:["gbk","gbk_bin"], |
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
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
cat <<EOF > /etc/yum.repos.d/fedora.repo | |
[warning:fedora] | |
name=fedora | |
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-23&arch=$basearch | |
enabled=1 | |
EOF | |
yum -y update gcc gcc-c++ |
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
{ | |
"Name":"tpcc1-ali-jd", | |
"Failover":false, | |
"Orders":[], | |
"Type":"synchronous", | |
"Tasks":[ | |
{ | |
"Type":"Src", | |
"NodeId":"90f3cd4d-7997-7b1b-cd99-e2c4d05c69e1", | |
"Config":{ |
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 | |
# chkconfig: 345 99 30 | |
# description: ndb_mgmd start/stop script | |
### BEGIN INIT INFO | |
# Provides: ndb_mgmd start/stop | |
# Required-Start: $local_fs $network $remote_fs | |
# Required-Stop: $local_fs $network $remote_fs | |
# Default-Start: 3 4 5 |
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 | |
# chkconfig: 345 60 40 | |
# description: datanode start/stop script | |
### BEGIN INIT INFO | |
# Provides: datanode | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 3 4 5 |
NewerOlder