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

Database

MySQL * database, table character set ๋ณ€๊ฒฝ

MySQL ์„ค์ •ํŒŒ์ผ์„ ์ˆ˜์ •ํ•จ์œผ๋กœ์จ character set์„ ๋ณ€๊ฒฝ ํ•  ์ˆ˜ ์žˆ์ง€๋งŒ,

์ด๋ฏธ ๋งŒ๋“ค์–ด๋†“์€ database๋‚˜ table์˜ ๊ฒฝ์šฐ ์„ค์ • ์ „ character set์„ ๋”ฐ๋ผ ๋งŒ๋“ค์–ด์กŒ๊ธฐ ๋•Œ๋ฌธ์— ๊ฐœ๋ณ„์ ์œผ๋กœ ๋ณ€๊ฒฝ์ด ํ•„์š”ํ•˜๋‹ค.

 

 

๋ณ€๊ฒฝํ•˜๊ธฐ

๋ฐ์ดํ„ฐ ๋ฒ ์ด์Šค ์„ค์ •

mysql> ALTER DATABASE [DB๋ช…] DEFAULT CHARACTER SET UTF8;

ํ…Œ์ด๋ธ” ์„ค์ •

mysql> ALTER TABLE [TABLE๋ช…] CONVERT TO CHARACTER SET UTF8;

 

 

ํ™•์ธํ•˜๊ธฐ

๋ฐ์ดํ„ฐ ๋ฒ ์ด์Šค ๊ฐ™์€ ๊ฒฝ์šฐ ์‚ฌ์šฉํ•  ๋ฐ์ดํ„ฐ ๋ฒ ์ด์Šค๋กœ ์ ‘์† ํ›„ ์„ค์ •ํ™•์ธ ๋ช…๋ น์–ด๋ฅผ ์น˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

mysql> use [DB๋ช…]
mysql> show variables like 'c%';

 

 


Thanks for ๐Ÿ™ˆ