Skip to main content

TIL-20210610

ยท 2 min read

Today I Learned, 2021-06-10

RDS ์ธ์Šคํ„ด์Šค ์‚ฌ์ด์ฆˆ ๋ณ€๊ฒฝโ€‹

  • RDS Aurora Mysql ์ธ์Šคํ„ด์Šค ์‚ฌ์ด์ฆˆ ๋ณ€๊ฒฝ์‹œ ๋ณ€๊ฒฝ ๋Œ€์ƒ์ด ์“ฐ๊ธฐ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ผ๋ฉด, ์ฝ๊ธฐ๊ฐ€ ์“ฐ๊ธฐ๊ฐ€ ๋˜๋Š” FailOver Time ๋™์•ˆ ์“ฐ๊ธฐ๊ฐ€ ์ผ์‹œ์ ์œผ๋กœ ์ค‘๋‹จ๋˜๋ฉฐ ๊ทธ ๊ธฐ๊ฐ„์€ ์•ฝ 30์ดˆ ์ •๋„ ์†Œ์š”๋œ๋‹ค.

RDS ์ธ์ฝ”๋”ฉ ๋ณ€๊ฒฝโ€‹

ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน ๋‚ด ์•„๋ž˜ ์„ค์ •๊ฐ’์„ ๋ณ€๊ฒฝํ•œ๋‹ค.

  • character_set_client: utf8mb4
  • character_set_connection: utf8mb4
  • character_set_database: utf8mb4
  • character_set_filesystem: utf8mb4
  • character_set_results: utf8mb4
  • character_set_server: utf8mb4
  • collation_connection: utf8mb4_general_ci
  • collation_server: utf8mb4_general_ci

ํ™•์ธํ•˜๊ธฐ

show variables like 'c%';

์ธ์ฝ”๋”ฉ ์ง์ ‘ ๋ณ€๊ฒฝํ•˜๊ธฐ

alter database [DATABASE_NAME] character set = 'utf8' collate = 'utf8_general_ci';

RDS ๋Š๋ฆฐ ์ฟผ๋ฆฌ ๋กœ๊ทธ ์„ค์ •โ€‹

  • RDS ์„ค์ •์—์„œ ๋Š๋ฆฐ ์ฟผ๋ฆฌ ๋กœ๊ทธ ๋ฅผ ์ฒดํฌํ•˜์˜€๋‹ค๊ณ  ๋Š๋ฆฐ ์ฟผ๋ฆฌ ๋กœ๊ทธ๊ฐ€ CloudWatch Logs ์— ์Œ“์ด์ง€ ์•Š๋Š”๋‹ค. ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน์—์„œ slow_query_log ๋ฅผ true(1) ๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.
  • ๋Š๋ฆฐ ์ฟผ๋ฆฌ์— ํŒ๋‹จ ๊ธฐ์ค€ ์—ญ์‹œ ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน์—์„œ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, long_query_time ๋ฅผ ์ˆ˜์ •ํ•˜๋ฉด ๋œ๋‹ค. ๊ธฐ๋ณธ๊ฐ’์€ 10์ดˆ.
  • log_queries_not_using_indexes ์„ 1 ๋กœ ๋ณ€๊ฒฝํ•˜๋ฉด ์ธ๋ฑ์Šค๋ฅผ ํƒ€์ง€ ์•Š๋Š” ๋ชจ๋“  ์ฟผ๋ฆฌ๋ฅผ ๋Š๋ฆฐ ์ฟผ๋ฆฌ๋กœ ๊ธฐ๋กํ•œ๋‹ค.

์ฐธ๊ณ โ€‹

No appropriate protocol (protocol is disabled or cipher suites are inappropriate)โ€‹

Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:171) ~[na:1.8.0_292]
at sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:98) ~[na:1.8.0_292]
at sun.security.ssl.TransportContext.kickstart(TransportContext.java:220) ~[na:1.8.0_292]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:428) ~[na:1.8.0_292]
at com.mysql.cj.protocol.ExportControlled.performTlsHandshake(ExportControlled.java:317) ~[mysql-connector-java-8.0.23.jar:8.0.23]
at com.mysql.cj.protocol.StandardSocketFactory.performTlsHandshake(StandardSocketFactory.java:188) ~[mysql-connector-java-8.0.23.jar:8.0.23]
at com.mysql.cj.protocol.a.NativeSocketConnection.performTlsHandshake(NativeSocketConnection.java:97) ~[mysql-connector-java-8.0.23.jar:8.0.23]
at com.mysql.cj.protocol.a.NativeProtocol.negotiateSSLConnection(NativeProtocol.java:333) ~[mysql-connector-java-8.0.23.jar:8.0.23]
... 91 common frames omitted

์ฐธ๊ณ โ€‹