- mysql 5.6
- Mater IP Address = 192.168.1.1
- Slave IP Address = 192.168.1.2
以下の例では、repl ユーザーが192.168.1.2 からレプリケーション用の接続をできるようにしている。
レプリケーションなので、ON *.*
で全データベース、全テーブルに対して許可している。
#!/bin/bash | |
set -euo pipefail | |
# tmux 会话名字 | |
sessionName=mc | |
# 服务器关闭警告信息 | |
stopDelay=10 | |
stopWarn=服务器将在${stopDelay}秒后关闭进行备份 | |
# 存档位置 |
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/x86 5.14.2-gentoo Kernel Configuration | |
# | |
CONFIG_CC_VERSION_TEXT="gcc (Gentoo 11.2.0 p1) 11.2.0" | |
CONFIG_CC_IS_GCC=y | |
CONFIG_GCC_VERSION=110200 | |
CONFIG_CLANG_VERSION=0 | |
CONFIG_AS_IS_GNU=y | |
CONFIG_AS_VERSION=23700 |
docker network create etcd --subnet 172.19.0.0/16 | |
docker run -d --name etcd0 --network etcd --ip 172.19.1.10 quay.io/coreos/etcd etcd \ | |
-name etcd0 \ | |
-advertise-client-urls http://172.19.1.10:2379,http://172.19.1.10:4001 \ | |
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \ | |
-initial-advertise-peer-urls http://172.19.1.10:2380 \ | |
-listen-peer-urls http://0.0.0.0:2380 \ | |
-initial-cluster-token etcd-cluster-1 \ | |
-initial-cluster etcd0=http://172.19.1.10:2380,etcd1=http://172.19.1.11:2380,etcd2=http://172.19.1.12:2380 \ |
#!/bin/sh | |
## | |
## Usage: ./ovpn-writer.sh SERVER CA_CERT CLIENT_CERT CLIENT_KEY SHARED_SECRET > client.ovpn | |
## | |
server=${1?"The server address is required"} | |
cacert=${2?"The path to the ca certificate file is required"} | |
client_cert=${3?"The path to the client certificate file is required"} | |
client_key=${4?"The path to the client private key file is required"} |
client | |
dev tun | |
remote example.com | |
resolv-retry infinite | |
nobind | |
persist-key | |
persist-tun | |
ca [inline] | |
cert [inline] | |
key [inline] |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
#!/usr/ali/bin/python | |
# coding=utf-8 | |
'''Implements a simple database interface | |
Example 0: Create connection: | |
# Set auto commit to false | |
db = DB(False, host = 'x', user = 'x', passwd = 'x', db = 'x') |