输入banner图图片脚本导航/分类

Mariadb 10.2.8版本GTID主从环境搭建以及切换

  • 一般使用slave_pos,当A->B,A挂掉,B当master,然后A好了,想要做B的slave情况下,使用current_pos,因为B以前是主库,没有slave_pos这个值

  •     由官网得知

    change master to

    master_host=‘192.168.1.117‘,

    master_user=‘slave‘,

    master_password=‘密码‘,

    master_port=3306,

    master_use_gtid=current_pos;

    start slave;

     

    e.查看新的从库的信息

    show slave status\G;

    f. 测试一下看主从是否一致

     

    Mariadb 10.2.8版本GTID主从环境搭建以及切换

    标签:user   event   服务器   二进制   images   sel   use   server   code