Open xianghu1314 opened 5 years ago
My node and proxysql are on the same LAN. this is my log: this is my config file: ` datadir="/var/lib/proxysql"
admin_variables= { admin_credentials="admin:admin" mysql_ifaces="0.0.0.0:6032" refresh_interval=2000 web_enabled=true web_port=6080 stats_credentials="stats:admin" }
mysql_variables= { threads=4 max_connections=2048 default_query_delay=0 default_query_timeout=36000000 have_compress=true poll_timeout=2000 interfaces="0.0.0.0:6033;/tmp/proxysql.sock" default_schema="information_schema" stacksize=1048576 server_version="5.1.30" connect_timeout_server=10000 monitor_history=60000 monitor_connect_interval=200000 monitor_ping_interval=200000 ping_interval_server_msec=10000 ping_timeout_server=200 commands_stats=true sessions_sort=true monitor_username="root" monitor_password="123456" monitor_galera_healthcheck_interval=2000 monitor_galera_healthcheck_timeout=800 }
mysql_galera_hostgroups = ( { writer_hostgroup=10 backup_writer_hostgroup=20 reader_hostgroup=30 offline_hostgroup=9999 max_writers=1 writer_is_also_reader=1 max_transactions_behind=30 active=1 } )
mysql_servers = ( { address="196.168.0.110" , port=3306 , hostgroup=10, max_connections=100 }, { address="192.168.0.112" , port=3306 , hostgroup=30, max_connections=100 } } mysql_query_rules = ( { rule_id=100 active=1 match_pattern="^SELECT . FOR UPDATE" destination_hostgroup=10 apply=1 }, { rule_id=200 active=1 match_pattern="^SELECT ." destination_hostgroup=20 apply=1 }, { rule_id=300 active=1 match_pattern=".*" destination_hostgroup=10 apply=1 } ) mysql_users = ( { username = "root", password = "123456", default_hostgroup = 10, transaction_persistent = 0, active = 1 }, { username = "root", password = "123456", default_hostgroup = 20, transaction_persistent = 0, active = 1 } )` thank you for help!!!
@minichate
Please have a look at table monitor.mysql_server_galera_log : you may find why ProxySQL can't find any healthy node.
monitor
mysql_server_galera_log
My node and proxysql are on the same LAN. this is my log: this is my config file: ` datadir="/var/lib/proxysql"
admin_variables= { admin_credentials="admin:admin" mysql_ifaces="0.0.0.0:6032" refresh_interval=2000 web_enabled=true web_port=6080 stats_credentials="stats:admin" }
mysql_variables= { threads=4 max_connections=2048 default_query_delay=0 default_query_timeout=36000000 have_compress=true poll_timeout=2000 interfaces="0.0.0.0:6033;/tmp/proxysql.sock" default_schema="information_schema" stacksize=1048576 server_version="5.1.30" connect_timeout_server=10000 monitor_history=60000 monitor_connect_interval=200000 monitor_ping_interval=200000 ping_interval_server_msec=10000 ping_timeout_server=200 commands_stats=true sessions_sort=true monitor_username="root" monitor_password="123456" monitor_galera_healthcheck_interval=2000 monitor_galera_healthcheck_timeout=800 }
mysql_galera_hostgroups = ( { writer_hostgroup=10 backup_writer_hostgroup=20 reader_hostgroup=30 offline_hostgroup=9999 max_writers=1 writer_is_also_reader=1 max_transactions_behind=30 active=1 } )
mysql_servers = ( { address="196.168.0.110" , port=3306 , hostgroup=10, max_connections=100 }, { address="192.168.0.112" , port=3306 , hostgroup=30, max_connections=100 } } mysql_query_rules = ( { rule_id=100 active=1 match_pattern="^SELECT . FOR UPDATE" destination_hostgroup=10 apply=1 }, { rule_id=200 active=1 match_pattern="^SELECT ." destination_hostgroup=20 apply=1 }, { rule_id=300 active=1 match_pattern=".*" destination_hostgroup=10 apply=1 } ) mysql_users = ( { username = "root", password = "123456", default_hostgroup = 10, transaction_persistent = 0, active = 1 }, { username = "root", password = "123456", default_hostgroup = 20, transaction_persistent = 0, active = 1 } )` thank you for help!!!