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

๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ

(251)
[Python Error ์ •๋ฆฌ] pymysql.err.ProgrammingError: (1146, "Table 'test.customers' doesn't exist") ํŒŒ์ด์ฌ ๋…ํ•™ ์ถ”์ฒœ ๋„์„œ Python Error ์ •๋ฆฌ pymysql.err.ProgrammingError: (1146, "Table 'test.customers' doesn't exist") ํ…Œ์ด๋ธ” ์ด๋ฆ„์ด ์•ˆ๋งž๋Œœ ( customers -> data(๋‚ด๊บผ) ) ์˜ˆ์ œ ์ฝ”๋“œ ๊ฐ€๋”ฐ ์“ฐ๋ฉด ์ €๋Ÿฐ๊ฑฐ ์ž˜ ์ฑ™๊ฒจ ๋ณด๋„๋ก
[Python Error ์ •๋ฆฌ] pymysql.err.OperationalError: (1049, "Unknown database 'test'") ํŒŒ์ด์ฌ ๋…ํ•™ ์ถ”์ฒœ ๋„์„œ Python Error ์ •๋ฆฌ pymysql.err.OperationalError: (1049, "Unknown database 'test'") ์ด๊ฑด mysql์— 'test'๋ผ๋Š” db๊ฐ€ ์—†์–ด์„œ ๊ทธ๋Ÿฐ๊ฐ€๋ถ€๋‹ค. ์•„์šฐ ์ข€ ๊ตฌ๊ธ€๋ง์€ ๋ฏธ๋ฆฌ ๋ญ”๊ฐ€ ํ•ด ๋†“์œผ๋ผ๊ณ  ์•Œ๋ ค์ฃผ๋˜์ง€ ๋งจ๋•…์— ํ—ค๋”ฉํ•˜๊ธฐ ํž˜๋“œ๋„ค ์บฌ~ ์ด ๊ฐ„๋‹จํ•œ๊ฑธ ์•„๋ฌด๋„ ์•ˆ์•Œ๋ ค์ฃผ๋‹ˆ ์ฐธ ์–ด๋ ต๊ตฌ๋จผ~
[Python Error ์ •๋ฆฌ] pymysql.err.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)") ํŒŒ์ด์ฌ ๋…ํ•™ ์ถ”์ฒœ ๋„์„œ Python Error ์ •๋ฆฌ pymysql.err.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)") mysql์— ์ ‘์† ํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ ์–ด์ฃผ๋ฉด ๋œ๋‹ค. connect = pymysql.connect( host = 'localhost', user = 'root', password = '์—ฌ๊ธฐ์— sql์— ์ ‘์†ํ• ๋•Œ์˜ ๋น„๋ฒˆ์„ ์ ์–ด์ค€๋‹ค.', db = 'test', charset = 'utf8' )
[Python Error ์ •๋ฆฌ] RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods ํŒŒ์ด์ฌ ๋…ํ•™ ์ถ”์ฒœ ๋„์„œ Python Error ์ •๋ฆฌ RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods cryptography๊ฐ€ ์„ค์น˜ ๋˜์–ด ์žˆ์ง€ ์•Š์•˜๋‹ค. pip3 install cryptography
๋งฅ๋ถ apache ์„ค์น˜ ๋งฅ๋ถ apache ์„ค์น˜ ๊ตฌ๊ธ€์—์„œ bitnami mamp stack ๊ฒ€์ƒ‰ ์œ„์™€ ๊ฐ™์ด ํด๋ฆญํ•˜์—ฌ ์„ค์น˜ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ ๋‹ค์šด๋œ ์„ค์น˜ ํŒŒ์ผ ํด๋ฆญ์—ฌ๊ธฐ์„œ ์˜ค๋ž˜ ๊ฑธ๋ฆผ, MySQL์€ ๋”ฐ๋กœ ๊น”์•˜๋Š”๋ฐ ์ด๊ฑฐ ๊น”์•„๋„ ๊ฐ€์น˜ ๊น”๋ฆฐ๋‹คํ•จ.๋‹ค ๊น”๊ณ  ์กฐ๊ธˆ ๊ธฐ๋‹ค๋ฆฌ๋ฉด ์ด๋Ÿฐ๊ฒŒ ๋œธ์—ฌ๊ธฐ์„œ Manage Servers๋ฅผ ๋ˆ„๋ฅด๋ž˜์›น์„œ๋ฒ„๊ฐ€ ๋Œ๊ณ  ์žˆ๋Š”๊ฑฐ๋ž˜
์ธํ„ฐ๋„ท๊ณผ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ธํ„ฐ๋„ท๊ณผ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ธํ„ฐ๋„ท์„ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์ตœ์†Œ 2๋Œ€ ์ด์ƒ์˜ ์ปดํ“จํ„ฐ๊ฐ€ ํ•„์š”ํ•˜๋‹ค.ํ•˜๋‚˜์˜ ์ปดํ“จํ„ฐ์—์„œ๋Š” ์š”์ฒญ์„ ํ•˜๋‚˜์˜ ์ปดํ“จํ„ฐ์—์„œ๋Š” ์‘๋‹ต์„ ํ•  ๊ฒƒ์ด๋‹ค. ๊ฐ๊ฐ์˜ ์—ญํ• ์„ ํ‘œํ˜„ํ•˜๋Š” ๋‹จ์–ด๋กœ์š”์ฒญํ•˜๋Š”์ชฝ์„ client (๊ฐ‘)์‘๋‹ตํ•˜๋Š”์ชฝ์„ server (์„) ์›น ๋ธŒ๋ผ์šฐ์ €๋Š” ์›น ํด๋ผ์ด์–ธํŠธ๋ผ๊ณ ๋„ ํ•œ๋‹ค.์„œ๋ฒ„๋Š” ์›น ์„œ๋ฒ„ MySQL์„ ์„ค์น˜ํ•˜๋ฉด ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ํด๋ผ์ด์–ธํŠธ์™€ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์„œ๋ฒ„๋ฅผ ๊น”์•„์ค€๋‹ค๊ณ  ํ•œ๋‹ค. ์—ฌํƒœ ์‹ค์Šต ํ–ˆ๋˜ MySQL monitor๊ฐ€ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ํด๋ผ์ด์–ธํŠธ์˜ ์ผ๋ถ€์˜€๋‹ค๊ณ  ํ•œ๋‹ค.์›Œํฌ๋ฒค์น˜๋ผ๋Š” ๊ฒƒ๋„ ์‚ฌ์šฉํ•ด ๋ณผ ๊ฒƒ์ด๋‹ค. โ˜ž ๋งฅ๋ถ apache ์„ค์น˜