๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ’ป/AWS

mysql

๋ฐ˜์‘ํ˜•

 

 

 

2. Access Denied ์˜ค๋ฅ˜ ํ•ด๊ฒฐ

์œ„์™€ ๊ฐ™์€ ๋ช…๋ น์–ด๋กœ ๋ฐ์ดํ„ฐ ์ด๊ด€์„ ์‹œ๋„ํ–ˆ์œผ๋‚˜ ๊ถŒํ•œ๋ฌธ์ œ๋•Œ๋ฌธ์— ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ์ถœ๋ ฅ๋˜์—ˆ๋‹ค.

Access denied; you need (at least one of) the SUPER privilege(s) for this operation

AWS RDS ์ง€์นจ์„œ์— ๋”ฐ๋ฅด๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ด์œ ๋•Œ๋ฌธ์— ์—‘์„ธ์Šค ๊ฑฐ๋ถ€ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค๊ณ  ํ•œ๋‹ค.

 

  • ๋Œ€์ƒ RDS ์ธ์Šคํ„ด์Šค์— ์ด์ง„ ๋กœ๊ทธ๊ฐ€ ํ™œ์„ฑํ™”([๋ฐฑ์—… ๋ณด์กด ๊ธฐ๊ฐ„] > 0)๋˜์–ด ์žˆ์œผ๋ฉฐ, mysqldump ํŒŒ์ผ์ด ํŠธ๋ฆฌ๊ฑฐ, ๋ทฐ, ํ•จ์ˆ˜ ๋˜๋Š” ์ด๋ฒคํŠธ์™€ ๊ฐ™์€ ๊ฐ์ฒด๋ฅผ ํฌํ•จ
  • ๊ฐ€์ ธ์˜จ mysqldump ํŒŒ์ผ์ด DB ์ธ์Šคํ„ด์Šค์— ์กด์žฌํ•˜์ง€ ์•Š๋Š” DEFINER ์†์„ฑ ์‚ฌ์šฉ์ž๋กœ ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•˜๋ ค๊ณ  ์‹œ๋„ํ–ˆ๊ฑฐ๋‚˜ ์‚ฌ์šฉ์ž๊ฐ€ ํ•„์š”ํ•œ SUPER ์‚ฌ์šฉ์ž ๊ถŒํ•œ์„ ๊ฐ€์ง€๊ณ  ์žˆ์ง€ ์•Š์€ ์†์„ฑ ์‚ฌ์šฉ์ž๋ฅผ ์ƒ์„ฑํ•˜๋ ค๊ณ  ์‹œ๋„
  • ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€์—์„œ ์ฐธ์กฐ๋œ ๋ผ์ธ์— ๋Œ€ํ•œ ๋ช…๋ น์— Amazon RDS DB ์ธ์Šคํ„ด์Šค์—์„œ ์ œ๊ณต๋˜์ง€ ์•Š๋Š” SUPER ๊ถŒํ•œ์ด ํ•„์š”

=> ๋”ฐ๋ผ์„œ ์˜ค๋ฅ˜๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ์œ„ํ•ด, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜์˜€๋‹ค.

 

 

(1)ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน ์ƒ์„ฑ ๋ฐ ์ ์šฉ

 

๋จผ์ € RDS์— ๋ฐฑ์—…๋ณธ์„ ์ €์žฅํ•˜๊ธฐ ์œ„ํ•œ ๊ถŒํ•œ์„ ์ค˜์•ผํ•œ๋‹ค. RDS ๋ฉ”๋‰ด์—์„œ ์ฃผ๊ธฐ์œ„ํ•ด [ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน]์„ ์ƒ์„ฑํ•œ๋‹ค.

 

ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน -> ํŒŒ๋ผ๋ฏธํ„ฐ ์ƒ์„ฑ(Create ParameterGroup) ์„ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน์„ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค. Group Name๊ณผ Description์„ ์ ๋‹นํžˆ ๊ธฐ์ž…ํ•˜์—ฌ ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน์„ ๋งŒ๋“ ๋‹ค.

 

๋งŒ๋“ค์–ด์ง„ ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน์„ ์ƒ์„ฑํ•˜๊ณ  ๊ฒ€์ƒ‰์ฐฝ์— log_bin_trust_function_creators ๋ฅผ ๊ฒ€์ƒ‰ํ•œ๋‹ค. ๊ทธ๋ƒฅ creators๋ผ๊ณ  ๊ฒ€์ƒ‰ํ•ด๋„ ์ƒ๊ด€์—†๋‹ค. ๊ทธ๋Ÿฌ๋ฉด ํŒŒ๋ผ๋ฏธํ„ฐ ์˜ต์…˜์ด ํ•„ํ„ฐ๋ง ๋˜๋Š”๋ฐ, [Edit Parameters]๋ฅผ ์„ ํƒํ•˜์—ฌ ์ด ๊ฐ’์„ 1๋กœ ์…‹ํŒ…ํ•˜์—ฌ ํŽธ์ง‘์„ ์™„๋ฃŒํ•œ๋‹ค.

 

ํŒŒ๋ผ๋ฏธํ„ฐ ์…‹ํŒ…

 

ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน์„ ์ถ”๊ฐ€ํ–ˆ๋‹ค๋ฉด ๊ทธ ํ›„์—” ์ถ”๊ฐ€ํ•œ ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน์„ DB ์ธ์Šคํ„ด์Šค์— ์ ์šฉํ•œ๋‹ค. ๋Œ€์‹œ๋ณด๋“œ์—์„œ ๋ณ€๊ฒฝํ•  ์ธ์Šคํ„ด์Šค๋ฅผ ํด๋ฆญํ•˜๊ณ 

Modify๋ฅผ ๋ˆ„๋ฅด๋ฉด ํŒŒ๋ผ๋ฏธํ„ฐ๊ทธ๋ฃน๋“ฑ์˜ ๊ตฌ์„ฑ์„ ๋ณ€๊ฒฝ ํ•  ์ˆ˜ ์žˆ๋‹ค.

์ƒˆ๋กœ ์ถ”๊ฐ€ํ–ˆ๋˜ ์ƒˆ๋กœ์šด ํŒŒ๋ผ๋ฏธํ„ฐ ๊ทธ๋ฃน์„ ์„ ํƒํ•˜๊ณ  ์ˆ˜์ •์‚ฌํ•ญ์„ ์ €์žฅํ•œ๋‹ค. ๋ณ€๊ฒฝํ•œ ๊ฐ’์„ DB ์ธ์Šคํ„ด์Šค์— ์ ์šฉํ•˜๋ฉด RDS๊ฐ€ ์•Œ์•„์„œ ์ฆ‰์‹œ์ ์šฉํ•ด์ฃผ๋Š”๋ฐ, ์ด ์ž‘์—…์€ ์ ์šฉ๋˜๊ธฐ๊นŒ์ง€ ๋ช‡ ๋ถ„์ •๋„ ์†Œ์š”๋  ์ˆ˜ ์žˆ๋‹ค.

 

 

 

 

 

 

 

 

https://jung-study.tistory.com/6

 

mySQL ํŒŒ์ผ RDS๋กœ ๋ฐ์ดํ„ฐ ์ด๊ด€ํ•˜๊ธฐ & Access denied ์˜ค๋ฅ˜ ํ•ด๊ฒฐ

1. ๋ฐ์ดํ„ฐ ์ด๊ด€ ํ˜„์žฌ MySQL์„ ์‚ฌ์šฉ์ค‘์ด๊ณ , AWS๋กœ ํ…Œ์ŠคํŠธ ์„œ๋ฒ„๋ฅผ ๋งŒ๋“ค ์ผ์ด ์ƒ๊ฒจ์„œ ๊ฐœ๋ฐœ์ค‘์ธ DB๋ฅผ RDS๋กœ ์˜ฎ๊ธฐ๊ณ ์ž ํ•˜์˜€๋‹ค. ๋ฐฉ๋ฒ•์€ ์—ฌ๋Ÿฌ๊ฐ€์ง€๊ฐ€ ์žˆ๋Š”๋ฐ, ๋‚˜๋Š” RDS์— ์›๊ฒฉ์œผ๋กœ ์ ‘์†ํ•˜์—ฌ ๋กœ์ปฌ์— ์žˆ๋Š” sqlํŒŒ

jung-study.tistory.com

 

 

https://kyuu-ng.tistory.com/79

 

[AWS RDS] Access denied for user 'admin'@'localhost' (using password: YES)

์ง„์งœ ์งœ์ฆ๋‚˜์„œ ์ฃฝ๊ธฐ ๋ฐ”๋กœ ์ผ๋ณด ์ง์ „์— ๋ธ”๋กœ๊ทธ 30๊ฐœ์ •๋„ ๋’ค์ ธ์„œ ์ฐพ์•„๋ƒˆ๋‹ค ๋ชจ๋“  ์‚ฌ๋žŒ์ด ์ด๋Ÿฐ ์ฆ์ƒ์„ ๊ฒช๋Š”๊ฑด ์•„๋‹Œ ๊ฒƒ ๊ฐ™๊ณ  ? ๋ช…๋ น์–ด๊ฐ€ ํ‹€๋ ธ๋Š”์ง€ ๊ถŒํ•œ์ด ๋ฌธ์  ์ง€ ๋ชจ๋ฅด๊ฒ ๋Š”๋ฐ ๋‘˜๋‹ค ๊ณ ์ณ์„œ ์ผ๋”๋‹ˆ ๋์Œ

kyuu-ng.tistory.com

 

 

https://okky.kr/questions/898491

 

OKKY - AWS RDS mysql ๊ถŒํ•œ ๋ฌธ์ œ

AWS RDS MariaDB ์‚ฌ์šฉ ์ค‘์ž…๋‹ˆ๋‹ค.root ์ ‘์†์€ ์ž˜๋˜๋Š”๋ฐ grant all privileges on *.* root@'%'; ๋ช…๋ น์„ ์ฃผ๋ฉดERROR 1045 (28000): Access denied for user 'root'@'%' (using password: YES) ๋ผ๊ณ  ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ฉ

okky.kr

 

 

 

 

 

 

 

 

 

 

 

 

https://dingrr.com/blog/post/rds%EB%A5%BC-%EC%8D%A8%EC%95%BC-%ED%95%98%EB%82%98%EC%9A%94-ec2%EC%97%90-%EC%84%A4%EC%B9%98%ED%95%98%EB%A9%B4-%EC%95%88%EB%90%98%EB%82%98%EC%9A%94

 

RDS๋ฅผ ์จ์•ผ ํ•˜๋‚˜์š”? EC2์— ์„ค์น˜ํ•˜๋ฉด ์•ˆ๋˜๋‚˜์š”? | ๋ธ”๋กœ๊ทธ | ๋”ฉ๊ทธ๋ฅด๋ฅด

RDS๋ฅผ ์จ์•ผ ํ•˜๋‚˜์š”? EC2์— ์„ค์น˜ํ•˜๋ฉด ์•ˆ๋˜๋‚˜์š”?

dingrr.com

 

 

https://velog.io/@whytili/AWS-RDS%EC%99%80-EC2-%EC%97%B0%EB%8F%99%ED%95%98%EA%B8%B0

 

[AWS] RDS์™€ EC2 ์—ฐ๋™ํ•˜๊ธฐ

์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” RDS๋ฅผ ์ƒ์„ฑํ•˜๊ณ  EC2์™€ ์—ฐ๊ฒฐํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. EC2์™€ ๊ด€๋ จ๋œ ํฌ์ŠคํŒ…์€ ํ•ด๋‹น ํฌ์ŠคํŒ…์„ ์ฐธ๊ณ ํ•ด์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. RDS๋ž€? RDS๋ž€ Relational Database Service์˜ ์•ฝ์ž๋กœ AWS ํด๋ผ์šฐ๋“œ์—

velog.io

 

 

https://velog.io/@cptkuk91/AWS-EC2%EC%97%90-MySQL-%EC%84%A4%EC%B9%98-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0

 

AWS EC2์— MySQL ์„ค์น˜, ์‚ฌ์šฉํ•˜๊ธฐ

๊ฐœ์ธ์ ์ธ ์ƒ๊ฐ์ž…๋‹ˆ๋‹ค.RDS๊ฐ€ ์กด์žฌํ•˜์ง€๋งŒ, EC2์— MySQL์„ ์„ค์น˜, ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ๋Š” RDS๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•  ๋งŒํผ ๊ทœ๋ชจ๊ฐ€ ํฐ ํ”„๋กœ์ ํŠธ๊ฐ€ ์•„๋‹ˆ๊ฑฐ๋‚˜, ๋‹จ์ˆœํžˆ ์—ฐ์Šต์„ ์œ„ํ•ด์„œ๋ผ๊ณ  ์ƒ๊ฐ๋ฉ๋‹ˆ๋‹ค.๋ฌผ๋ก  RDS๋ฅผ EC2์— ์—ฐ๋™

velog.io

 

 

 

https://aeliketodo.tistory.com/96

 

[SPRING] AWS RDS Connection timed out, unable to connect to localhost ์—ฐ๊ฒฐ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

๋ฌธ์ œ ์ƒํ™ฉ DB ์—ฐ๊ฒฐ ๋ฌธ์ œ๋กœ 3์ผ์„ ๊ผฌ๋ฐ• ์‚ฝ์งˆ๋งŒ ํ–ˆ๋‹ค ใ…Ž.ใ…Ž AWS RDS ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ EC2๊ฐ€ ์•„๋‹ˆ๋ผ ์™ธ๋ถ€ IP์˜ MySQL Workbench์™€ ์Šคํ”„๋ง ๋ถ€ํŠธ ํ”„๋กœ์ ํŠธ์— ์—ฐ๊ฒฐํ•˜๊ณ  ์‹ถ์—ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ Workbench์—์„œ๋Š” unable to connect

aeliketodo.tistory.com

 

 

https://gksdudrb922.tistory.com/240

 

[AWS] RDS Connection timed out ์—ฐ๊ฒฐ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

RDS๋ฅผ ์—ฌ๋Ÿฌ๋ฒˆ ๋‹ค๋ค„๋ดค์ง€๋งŒ ๊ฐ™์€ ์„ค์ •์— ๋Œ€ํ•ด์„œ๋„ ๊ณ„์† ์—ฐ๊ฒฐ์ด ๋˜์ง€ ์•Š์•„ ๋งŽ์ด ์• ๋ฅผ ๋จน์—ˆ๋‹ค. EC2๊ฐ€ ์•„๋‹Œ Mysql workbench ํ˜น์€ Datagrip๊ณผ ๊ฐ™์ด ๋กœ์ปฌ์—์„œ RDS์— ์ ‘์†ํ•˜๊ณ  ์‹ถ์€๋ฐ, "Connection timed out" ์˜ค๋ฅ˜๊ฐ€ ๊ณ„

gksdudrb922.tistory.com

 

 

https://velog.io/@dailylifecoding/DBeaver-MySQL-connecting-error-Public-Key-Retrieval-is-not-allowed-solved

 

[DBeaver] MySQL ์—ฐ๊ฒฐ ์‹œ "Public Key Retrieval is not allowed" ํ•ด๊ฒฐํ•˜๊ธฐ

์ด๋ฒˆ์— docker ๋กœ MySQL Container ๋ฅผ ํ•˜๋‚˜ ๋„์šฐ๊ณ , DBeaver ๋กœ ์—ฐ๊ฒฐํ•˜๋ ค๊ณ  ํ•˜๋‹ˆ Public Key Retrieval is not allowed ๋ผ๋Š” ๋ฌธ๊ตฌ๊ฐ€ ๋‚˜์˜ค๊ณ  ์—ฐ๊ฒฐ์ด ์•ˆ ๋œ๋‹ค! ํ•ด๊ฒฐ๋ฒ•์€...?

velog.io

 

 

 

https://amajoy.tistory.com/entry/mysql-Access-denied-for-user-rootip-using-password-YES

 

[mysql] Access denied for user 'root'@'ip' (using password: YES)

์ƒํ™ฉ ๋‚ด pc์—์„œ ์„œ๋ฒ„์— ์žˆ๋Š” ๋ฐ์ดํ„ฐ ๋ฒ ์ด์Šค๋ฅผ ์ ‘์†ํ•˜๋ ค๊ณ  ํ•˜๋Š”๋Œ€ ์•„๋ž˜์˜ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒAccess denied for user 'root'@'๋‚ดip' (using password: YES)๊ฒ€์ƒ‰์„ ํ•ด๋ณด์•˜๋‹ค ๋‚ด๊ฐ€ ์ ‘์†์„ ํ•  ๊ถŒํ•œ์ด ์—†์—ˆ๋‹ค putty๋กœ ์ ‘์†ํ•ด์„œ

amajoy.tistory.com

 

 

 

 

 

 

 

 

 

 

 

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

 

https://blog.naver.com/islove8587/221970366883

 

[MYSQL] ์ผ๋ฐ˜์ ์ธ ์˜ค๋ฅ˜๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ์œ ์šฉํ•œ ์ •๋ณด๋“ค

[์ฐธ๊ณ  ์‚ฌ์ดํŠธ] - MySQL ์ผ๋ฐ˜์ ์ธ ์˜ค๋ฅ˜๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ์œ ์šฉํ•œ ์ •๋ณด๋“ค - [MySQL || MariaDB] System...

blog.naver.com

 

 

๋ฐ˜์‘ํ˜•

'๐Ÿ’ป > AWS' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

์œˆ๋„์šฐ10์—์„œ SSH ์ ‘์† ์‹œ pem ํŒŒ์ผ ๊ถŒํ•œ๋ณ€๊ฒฝ  (0) 2023.11.16
[AWS] bookmarks  (0) 2022.07.11
AWS  (0) 2022.07.01