๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
IT-Engineering/Mac

Mac OS Monterey(๋ฒ„์ „ 12.6)์—์„œ mysql 5.7 ์„ค์น˜ํ•˜๊ธฐ

by ๐Ÿงž‍โ™‚๏ธ 2023. 6. 29.
๋ฐ˜์‘ํ˜•

์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” ๋งฅ ๋ฒ„์ „

mac ๋ฒ„์ „

 

mysql ์„ค์น˜๋ฅผ ์œ„ํ•ด Homebrew๋ฅผ ํ™œ์šฉํ•˜์˜€์œผ๋ฉฐ, ์ด์™€ ๊ด€๋ จํ•ด์„œ๋Š” ์•„๋ž˜ ๊ธ€ ์ฐธ์กฐ.

https://gentlesark.tistory.com/114

 

[Mac] ๋งฅ์— Homebrew ์„ค์น˜ ๋ฐ brew cask ์„ค์น˜

Ubuntu์— ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ ๋„๊ตฌ apt๊ฐ€ ์žˆ๋‹ค๋ฉด, ๋งฅ์—๋Š” ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ ๋„๊ตฌ Homebrew๊ฐ€ ์žˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  cask๋Š” ์ด Homebrew์˜ ํ™•์žฅํŒฉ์ด๋ผ๊ณ  ๋ณผ ์ˆ˜ ์žˆ๋Š”๋ฐ, ์ด ๋‘๊ฐ€์ง€ ๋ชจ๋‘ ์„ค์น˜ ๋ฐฉ๋ฒ•์„ ์†Œ๊ฐœํ•œ๋‹ค. Homebrew ์„ค์น˜ ๋ฐฉ๋ฒ• /bi

gentlesark.tistory.com

 

์„ค์น˜ ๋ช…๋ น์–ด

brew install mysql@5.7

 

์ดํ›„ ์„ธํŒ… 

mysql ๋ช…๋ น์–ด ์‹คํ–‰์ด ๋˜๋„๋ก ํ™˜๊ฒฝ๋ณ€์ˆ˜์— ๊ฒฝ๋กœ ์„ค์ •

echo 'export PATH="/opt/homebrew/opt/mysql@5.7/bin:$PATH"' >> ~/.zshrc

ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์ƒˆ๋กœ ์ ์šฉ (.์€ source๋กœ ์ž…๋ ฅํ•ด๋„ ๋จ)

. ~/.zshrc

mysql ์„œ๋น„์Šค ์‹œ์ž‘

brew services start mysql@5.7

ํŒจ์Šค์›Œ๋“œ ์„ค์ • 1

mysql_secure_installation

ํŒจ์Šค์›Œ๋“œ ์„ค์ •2 (๋‹ค๋ฅธ ๋ฐฉ์‹, 1 ํ–ˆ์œผ๋ฉด ์•ˆ ํ•ด๋„ ๋จ)

mysqladmin -u root password '<password>'

ํŒจ์Šค์›Œ๋“œ ์„ค์ •ํ•œ ํ›„ mysql์„ root ๊ณ„์ •์œผ๋กœ ์‹คํ–‰ํ•˜๊ธฐ

mysql -u root -p

mysql ์ข…๋ฃŒ

quit

 

์ด์ƒ mysql 5.7์„ mac OS ์—์„œ ์ž˜ ํ™œ์šฉํ•ด๋ณด์ž!

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€