mysql主从

mysql主从

GRANT ALL ON . TO bkcetest@% IDENTIFIED BY ‘bkce101’

./grant_mysql_priv.sh -n default-root -u ‘bktest’ -p ‘ct1993’ -H “10.0.7.66”

从: /usr/bin/mysql —defaults-file=”/etc/mysql/client.conf” -uroot -p’bkce101’
change master to master_host=’10.0.6.5’, master_port=3306, master_user=’bktest’, master_password=’ct1993’, master_log_file=’binlog.006614’, master_log_pos=924;

change master to master_host=’10.0.6.5’,master_user=’mysync’,master_password=’q123456’,master_port=3306,master_log_file=’binlog.006614’,master_log_pos=1788;

req=$(cat <<EOF
{
“service”: {
“id”: “mysql-f817ba48-b3b0-11eb-a001-005056a2a0d3”,
“name”: “mysql”,
“address”: “10.0.7.66”,
“port”: 3306,
“check”: {
“tcp”: “10.0.7.66:3306”,
“interval”: “10s”,
“timeout”: “3s”
}
}
}
EOF

curl —request PUT —data “$(jq -r .service <<<”$req”)” “$REG_SVC_API”

curl -X POST http://10.0.6.57:10205/v2/push/ -d ‘${REPORT_DATA}’

sysctl -w

{

# 数据通道标识,必需项
"data_id": 1500008,
# 数据通道标识验证码,必需项
"access_token": "4be26155cec14faeb19e769cecfb214f",
"data": [{
    # 事件标识名,最大长度128
            "event_name": "nginx-test",
            "event": {
                # 事件内容,必需项
                "content": "nginx m没有监听"
            },
    # 来源标识如IP,必需项
    "target": "127.0.0.1",
    # 自定义维度,非必需项
    "dimension": {
        "module": "db",
        "location": "guangdong"
    },
    # 数据时间,精确到毫秒,非必需项
    "timestamp": 1620911024038
}]

}