Skip to content

Instantly share code, notes, and snippets.

@koheyamada
Created February 23, 2018 05:53
Show Gist options
  • Select an option

  • Save koheyamada/159fdb348708a5baa553d1b2f46d5fd7 to your computer and use it in GitHub Desktop.

Select an option

Save koheyamada/159fdb348708a5baa553d1b2f46d5fd7 to your computer and use it in GitHub Desktop.
NLBを利用してRDSの負荷分散を行う。 ref: https://qiita.com/kooohei/items/c6443c2b455c62907832
$ mysql -hNLB4RDS-a3b3aefb0002a0e2.elb.ap-northeast-1.amazonaws.com -uroot -pProudit0404!
ERROR 1129 (HY000): Host '10.0.2.59' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
max_connect_errors の値を 18446744073709547520 へ変更。
$ host koh3i-01.cmhex6vatlc7.ap-northeast-1.rds.amazonaws.com
koh3i-01.cmhex6vatlc7.ap-northeast-1.rds.amazonaws.com has address 10.0.1.114
$ host koh3i-02.cmhex6vatlc7.ap-northeast-1.rds.amazonaws.com
koh3i-02.cmhex6vatlc7.ap-northeast-1.rds.amazonaws.com has address 10.0.2.222
$ mysql -hNLB4RDS-a3b3aefb0002a0e2.elb.ap-northeast-1.amazonaws.com -uroot -pProudit0404!
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2249
Server version: 5.6.37 MySQL Community Server (GPL)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment