Skip to content

Latest commit

ย 

History

History
44 lines (32 loc) ยท 2.93 KB

Errorlist.md

File metadata and controls

44 lines (32 loc) ยท 2.93 KB

Errorlist

mysql ์‚ฌ์šฉํ•˜๋ฉด์„œ ๋ฐœ์ƒํ–ˆ๋˜ ์—๋Ÿฌ ๋ฆฌ์ŠคํŠธ๋“ค..๐Ÿ˜‚

  • "too many connections"

    • ๋„ˆ๋ฌด ๋งŽ์€ connection์ด ์œ ์ง€๋˜์–ด์„œ ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ (์ดˆ๊ธฐ์„ค์ •๊ฐ’์€ 100๋กœ ์„ค์ •๋˜์–ด์žˆ๋‹ค๊ณ  ํ•œ๋‹ค.)

    • ๋˜ํ•œ, wait_timeout์˜ ์ดˆ๊ธฐ ์„ค์ •๊ฐ’์€ 288000(s)๋กœ ๋„ˆ๋ฌด ๊ธด ํŽธ

    • ๋”ฐ๋ผ์„œ max_connections ๊ฐ’์„ ๋ณ€๊ฒฝํ•ด์ค˜์•ผ๋˜๋ฉฐ, wait_timeout ์„ค์ • ๊ฐ’๋„ ๋‚ฎ์ถฐ์ค˜์•ผ ํ•จ

    • wait_timeout์„ ์„ค์ •ํ–ˆ๋Š”๋ฐ๋„ mysql ๋ช…๋ น์–ด๋ฅผ ์ณ์„œ ํ™•์ธํ•ด๋„ ์ ์šฉ์ด ์•ˆ๋˜์–ด์žˆ๋Š” ๊ฒฝ์šฐ, show global variables like '%wait_timeout%';์„ ์ž…๋ ฅํ•˜์—ฌ ํ™•์ธํ•ด๋ณผ ๊ฒƒ โ—โ—โ—

      ๋„์›€์ด ๋œ ๋‹ค๋ฅธ์‚ฌ๋žŒ์˜ ๋ธ”๋กœ๊ทธ๐Ÿ‘

  • "sql: no rows in result set"

    • ํŠน์ • ์กฐ๊ฑด์— ๋”ฐ๋ผ row ์กฐํšŒํ•  ๋•Œ, ๋ฐœ์ƒํ•œ ์—๋Ÿฌ
    • ํ•ด๋‹น ์กฐ๊ฑด์— ๋ถ€ํ•ฉํ•œ row๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š์„ ๋•Œ ๋ฐœ์ƒํ•จ
  • "Error 1054 Unknown column in where clause"

    • query๋ฅผ ๋‚ ๋ฆด ๋•Œ, sql๋ฌธ์— ์กฐ๊ฑด๋ฌธ ๋ถ€๋ถ„์„ ~ 'WHERE ='+<์กฐ๊ฑด๋ณ€์ˆ˜> ๋กœ ์ฒ˜๋ฆฌ ํ–ˆ์„ ๋•Œ ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ
    • ~ WHERE = '%s'",<์กฐ๊ฑด๋ณ€์ˆ˜>๋กœ ์ฒ˜๋ฆฌํ•ด์ค˜์•ผ ํ•จ (์ฆ‰, ๋ณ€์ˆ˜ ์•ž๋’ค๋กœ ์ž‘์€ ๋”ฐ์˜ดํ‘œ '๊ฐ€ ์žˆ์–ด์•ผ ํ•จ, ์ž‘์€ ๋”ฐ์˜ดํ‘œ๊ฐ€ ๋ฌธ์ž์—ด์˜ ๊ตฌ๋ถ„ ๊ธฐํ˜ธโ—)
    • stackoverflow ์ฐธ๊ณ 
    • ์ถ”๊ฐ€ : only ์ˆซ์ž์ธ ๊ฒฝ์šฐ ๋ฌธ์ œ ๋ฐœ์ƒ์ด ์—†์œผ๋‚˜, text๋กœ ์‹œ์ž‘๋œ ๊ฒฝ์šฐ ํ•ด๋‹น ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•จ
  • "sql: expected 0 arguments, got 1"

    • golang์œผ๋กœ db.Exec ํ•จ์ˆ˜ ์‚ฌ์šฉํ•ด์„œ DELETE sql๋ฌธ ์ˆ˜ํ–‰์‹œ ๋ฐœ์ƒ
    • db.Exec ํ•จ์ˆ˜์— ์ „๋‹ฌํ•˜๋Š” sql๋ฌธ ํ˜•์‹์ด ์ž˜๋ชป๋˜์„œ ๋ฐœ์ƒํ•œ ์—๋Ÿฌ๋กœ ๋ณด์ž„
      • ex) ์—๋Ÿฌ๋ฐœ์ƒo : db.Exec("delete from tbl_example where id = '%s' and name in ('sujin', 'sj', 'sujiny2222')", id)
      • ex) ์—๋Ÿฌ๋ฐœ์ƒx : db.Exec("delete from tbl_example where id = (?) and name in ('sujin', 'sj', 'sujiny2222')", id)
  • MySQL Workbench ์‚ฌ์šฉ ์ค‘ ๋™์ž‘์•ˆํ•˜๋Š” ์ด์Šˆ : Error while loading image

    • ๋ฐฉ๋ฒ•1. window๊ธฐ์ค€ ์ œ์–ดํŒ>ํ”„๋กœ๊ทธ๋žจ ์ œ๊ฑฐ ์ฐฝ์—์„œ MySQL Workbench 8.0 CE ๋งˆ์šฐ์Šค ์šฐํด๋ฆญ --> "๋ณต๊ตฌ" ๋ฒ„ํŠผ ํด๋ฆญ
    • ๋ฐฉ๋ฒ•2. mysql installer์—์„œ remove ํ›„, ์žฌ ์„ค์น˜(ํ”„๋กœ๊ทธ๋žจ ํด๋”๊ฐ€ ์ œ๋Œ€๋กœ ์ง€์›Œ์ง€์ง€ ์•Š์€ ๊ฒฝ์šฐ, ์„ค์น˜๋œ ํ”„๋กœ๊ทธ๋žจ ํด๋”๋ฅผ ์‚ญ์ œํ•ด์•ผ ํ•จ)

      ๋„์›€์ด ๋œ stackoverflow

  • Error : ER_TRUNCATED_WRONG_VALUE : Truncated incorrect DOUBLE value

    • ๊ฐ’์˜ ํƒ€์ž…์ด ๋งž์ง€ ์•Š์€ ๊ฒฝ์šฐ, ๊ตฌ๋ฌธ ์˜ค๋ฅ˜ ์กด์žฌ ์‹œ ๋ฐœ์ƒ
      • ex) ๊ฐ’์˜ ํƒ€์ž…์ด INT๋กœ ์ •์˜๋˜์–ด์žˆ๋Š”๋ฐ, VACHAR๋ฅผ ์ž…๋ ฅํ•œ ๊ฒฝ์šฐ
      • ex) update ๋ช…๋ น์–ด ์ž…๋ ฅ ์‹œ, ์ฝค๋งˆ(,)๋กœ ๋ฌถ์–ด์ค˜์•ผํ•˜๋Š” ๋ถ€๋ถ„์„ and๋กœ ๋ฌถ์–ด์ค€ ๊ฒฝ์šฐ
  • ing

์ฐธ๊ณ  ๐Ÿ’ซ