2023/02/09 1

๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ ์—†์ด MySQL ์ ‘์†ํ•˜๊ธฐ

MySQL ๋ฒ„์ „์ด ์ ์  ์˜ฌ๋ผ๊ฐ€๋ฉด์„œ ์–ธ์ œ๋ถ€ํ„ฐ์ธ๊ฐ€ mysql ๋ช…๋ น์–ด๋กœ ์ ‘์†์‹œ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ๊ฐ™์ด ์ž…๋ ฅํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ์•ˆ์ „ํ•˜์ง€ ์•Š๋‹ค๋Š” ๊ฒฝ๊ณ ๊ฐ€ ๋‚˜์˜จ๋‹ค. $ mysql -hlocalhost -udb_user -pdb_password mysql: [Warning] Using a password on the command line interface can be insecure. ์‰˜ ์Šคํฌ๋ฆฝํŠธ๋กœ DB ์ ‘์†ํ•˜๋Š” ์ž‘์—…์„ ํ•˜๋Š” ๊ฒฝ์šฐ ์œ„์™€ ๊ฐ™์ด ๋ช…๋ น์–ด์— ๋น„๋ฐ€๋ฒˆํ˜ธ๊นŒ์ง€ ๊ฐ™์ด ์ž…๋ ฅํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์€๋ฐ ์‹คํ–‰์€ ๋˜์ง€๋งŒ ๊ฒฝ๊ณ ๊ฐ€ ๋‚˜์˜ค๋Š”๊ฒŒ ๋งค์šฐ ๊ฑฐ์Šฌ๋ฆฐ๋‹ค. ์ด๋Ÿฐ ๊ฒฝ์šฐ๋Š” ์•„๋ž˜ 2๊ฐ€์ง€ ๋ฐฉ๋ฒ•์œผ๋กœ ํ•ด๊ฒฐ์ด ๊ฐ€๋Šฅํ•˜๋‹ค. ๋ฐฉ๋ฒ•1) ๊ณ„์ • home path (๋ฆฌ๋ˆ…์Šค ๊ธฐ์ค€ /home/userid ๋“ฑ) ์— .my.cnf ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๊ณ  ์•„๋ž˜์™€ ๊ฐ™์ด ๋‚ด์šฉ์„ ์ž…๋ ฅํ•œ๋‹ค. ..

IT Talks/Database 2023.02.09
728x90