› MySQL 5.5 Community Server
› MySQL 5.6 Community Server
› Percona Configuration Wizard
› XtraBackup 搭建主从复制
Great Sites on MySQL
› Percona
› MySQL Performance Blog
› Severalnines
推荐管理工具
› Sequel Pro
› phpMyAdmin
推荐书目
› MySQL Cookbook
MySQL 相关项目
› MariaDB
› Drizzle
参考文档
› http://mysql-python.sourceforge.net/MySQLdb.html
qtsunk
V2EX  ›  MySQL

请教一个 ProxySQL 配置问题

  •  
  •   qtsunk · Jul 26, 2019 · 4897 views
    This topic created in 2630 days ago, the information mentioned may be changed or developed.

    使用的是 proxysql 原生自带的 galera 集群配置方案,具体配置如下:

    INSERT INTO mysql_servers ( hostgroup_id, hostname, PORT, weight )
    VALUES
        ( 2, '192.168.0.3', 3306, 100 ),
        ( 2, '192.168.0.4', 3306, 10 ),
        ( 3, '192.168.0.5', 3306, 100 );
    
    INSERT INTO mysql_galera_hostgroups ( writer_hostgroup, backup_writer_hostgroup, reader_hostgroup, offline_hostgroup, active, max_writers, writer_is_also_reader, max_transactions_behind )
    VALUES
        ( 2, 4, 3, 1, 1, 1, 0, 100 );
    

    加载配置后,理论上应该 192.168.0.4 被改为 4 组,其他保持不变,但实际情况如下:

    mysql> select hostgroup_id,hostname,status,weight from runtime_mysql_servers;    
    +--------------+-------------+--------+--------+
    | hostgroup_id | hostname    | status | weight |
    +--------------+-------------+--------+--------+
    | 2            | 192.168.0.5 | ONLINE | 100    |
    | 4            | 192.168.0.3 | ONLINE | 100    |
    | 4            | 192.168.0.4 | ONLINE | 10     |
    +--------------+-------------+--------+--------+
    

    .5 变成了 2 组

    .3 和 .4 都变成了 4 组,这直接就懵逼了。。怎么会这样?请问是什么问题?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2762 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 07:51 · PVG 15:51 · LAX 00:51 · JFK 03:51
    ♥ Do have faith in what you're doing.