• mysql5.7.21 主存复制


    备份

    PlUSH TABLES WITH READ LOCK;
    mysqldump -u username -p --databases dbname2 dbname2 > weshop_test.sql

    mysqldump -uroot -p -h192.168.56.9 --set-gtid-purged=off --databases weshop_test>weshop_t est.sql
    UNLOCK TABLES

    恢复 mysql -uroot -p -h 127.0.0.1 -P23306  weshop_test <weishop_test.sql

    master

    [mysqld]

    log_bin=master-bin
    log_bin_index = master-bin.index
    server-id=1
    binlog_do_db=weshop_test
    binlog_ignore_db = mysql
    expire-logs-days=7

    执行:

    grant replication slave on *.* to 'slave1' @'%' identified by '123456';
    show master status;

    slave

    [mysqld]
    server-id=2
    relay-log = slave-relay-bin
    relay-log-index = slave-relay-bin.index

    执行:

    change master to master_host='master',master_port=3306,master_user='slave1',master_password='123456',master_log_file='master-bin.000002',master_log_pos=154
    show satus status;

  • 相关阅读:
    ch_5102 Mobile Service
    ch_POJ1201 Intervals
    [CodeVs]谁是赢家
    树上莫队
    [NOI2009]管道区珠
    拉格朗日差值
    Simpson&自适应Simpson
    数论学习笔记
    hibernate FetchType理解
    Hibernate的generator属性之意义
  • 原文地址:https://www.cnblogs.com/anjunact/p/8297493.html
Copyright © 2020-2023  润新知