Windows环境mysql主从复制
发布日期:2021-05-10 04:21:13 浏览次数:22 分类:精选文章

本文共 2725 字,大约阅读时间需要 9 分钟。

Windows���������MySQL������������������������

������Windows���������������MySQL������������������������������������������������������

1. ���������������������MySQL���������

������������������������������������������������������������������������������������������������������������������������������������

2. ������������������

���������������������������������������������������������������������������

  • my.ini ���������

    • ���������������
      • server-id = master_id
      • log_bin = master_log_binary_log
    • ���������������
      • server-id = slave_id
      • log_bin = slave_log_binary_log
      • ������ master_info_repository = 1 ��� repossession = 1 ������
  • auto.cnf ���������

    • ���������������������������������������������
    • ������ server_id ���������������

3. ������������������������

���Windows������������������������������������������MySQL���������

// ������real_path_with_your_slave_installation_directorymysqld --installslave --defaults-file="D:\Program Files\mysql-slave\my.ini"

4. ������������

������������������������������������������������

mysqld start

5. ���������������������������

������������������������������������������������������������������������������������������������

  • my.ini ������:
    • ���������������������������������������������������������
    • ��������������� binlog-do-db������������������������������������������
    • ��������������� binlog_committ_log_on_update ��� binlog_rowwarmup_threshold ������

6. ���������������������������

���������������������������������������������������������

// ���������������GRANT REPLICATION slave ON *.* TO 'replication_user'@'from_sever' Identified by 'password';// ���������������GRANT REPLICATION slave ON *.* TO 'replication_user'@'master' Identified by 'password';

7. ���������������������������������

������������������������������������������������������������������

// ������������START_SLAVE 'replication_user'@'from_server' WITH master_host='master gelenek

������������������

������������������������������������������������

  • ������1067���������������������������������������������������������

    • ������������������������������������������ > ��������������������� > ���Windows��������� > ������������������
    • ���������unknown variable������������������ --default sustainability ���������������������
  • UUID������������������������������������ auto.cnf ��������������������������������������������� UUID���

  • ������1236��������������������������������������������� log_bin ������������������������������

  • ������������

    ���������������������������������������������������

    // ������������������������������������mysqld stop slave// ���������������mysqld reset slave// ���������������mysqld start slave

    ������������������������������Windows���������������������MySQL���������������������������������������������������

    上一篇:nginx fastdfs 配置后 访问报404
    下一篇:2020-08-15

    发表评论

    最新留言

    第一次来,支持一个
    [***.219.124.196]2025年04月21日 20时08分19秒