°Ô½Ã¹° 2°Ç
 
[DB] Mysql 5.6.21 ¼Ò½º ¼³Ä¡Çϱâ
±Û¾´ÀÌ : ÃÖÀå¼· ³¯Â¥ : 2014-11-11 (È­) 14:52 Á¶È¸ : 4984

RedHat Enterpirse Linux 6.5¿¡¼­ Mysql-5.6.21¼³Ä¡Çϱâ

1. ¼³Ä¡ ȯ°æ
OS : RHEL 6.5 64Bit
DB : Mysql-5.6.21 Source Package (Mysql-5.6.21.tar.gz)
Mysql °æ·Î : /usr/local/mysql
Mysql Config °æ·Î : /usr/local/mysql/Config/my.cnf
DATA °æ·Î : /DATA

2.»ç¿ëÀÚ »ý¼º
#groupadd mysql
#useradd ?g mysql mysql
#passwd mysql (mysql °èÁ¤¿¡ ´ëÇؼ­ Æнº¿öµå´Â ¼±ÅûçÇ×)

 4. ÄÄÆÄÀÏ (cmake -> make -> make install)

#cmake

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql/
-DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock
-DDEFAULT_CHARSET=utf8 
-DDEFAULT-COLLATION=utf8_general_ci 
-DWITH_EXTRA_CHARSETS=all -DMYSQL_DATADIR=/DATA 
-DSYSConFDIR=/usr/local/mysql/Config 
-DENABLED_LOCAL_INFILE=1 
-DWITH_MYISAM_STORAGE_ENGINE=1 
-DWITH_INNOBASE_STORAGE_ENGINE=1 
-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_MMORY_STORAGE_ENGINE=1
-DWITH_READLINE=1 
-DENABLED_LOCAL_INFILE=1
-DMYSQL_USER=mysql
-DMYSQL_TCP_PORT=3306
-DENABLE_DOWNLOADS=1

#make && make install
#cp support-files/my-default.cnf /usr/local/mysql/Config/my.cnf

5.±ÇÇÑ ¼öÁ¤
#chown -R mysql.mysql /usr/local/mysql
#chown -R mysql.mysql /DATA

6.DB »ý¼º
#./usr/local/mysql/scripts/mysql_install_db
--defaults-file=/usr/local/mysql/Config/my.cnf
--user=mysql 
--basedir=/usr/local/mysql 
--datadir=/DATA
--explicit_defaults_for_timestamp=on

7.¼­ºñ½º ¼³Á¤ ¹× È®ÀÎ
#cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld

#vim /etc/init.d/mysqld (46,47¹ø ¶óÀÎ)
basedir=/usr/local/mysql/
datadir=/DATA/

#chkconfig mysqld on
#chkconfig ?-list | grep mysqld

8.Mysql ¼­ºñ½º ½ÇÇà
#service mysqld stat
(¿À·ù ¹ß»ý½Ã ¹®¼­ ¾Æ·¡ ¿À·ù °¡À̵å ÂüÁ¶)

9.Mysql ¼­ºñ½º Á¤»ó ·Î±×ÀÎ È®ÀÎ
# /usr/local/mysql/bin/mysql -u root
mysql>

10.Mysql ¿À·ù °¡À̵å
> Starting MySQL....The server quit without updating  PID file[FAILED]ib/mysql/200-VM.pid)
mysql °æ·Î°¡ Ʋ·Á¼­ my.cnf ÆÄÀÏ ³»¿¡¼­ °æ·Î¸¦ ÁöÁ¤ÇØÁØ´Ù. 
(¿©±â¼­´Â/usr/local/mysql/Config/my.cnf ÆÄÀÏÀ» ¼öÁ¤ÇØÁØ´Ù)

> COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'utf8' 
charset °ú collation ÀÌ Æ²·Á¼­ ¹ß»ýÇÏ´Â ¿À·ù À̹ǷΠ/usr/local/mysql/Config/my.cnf
ÆÄÀϾȿ¡ [mysqld] ¾Æ·¡¿¡ 3ÁÙÀ» Ãß°¡ ÇØÁØ´Ù.

character-set-server = utf8 
collation-server    =utf8_general_ci 
character-set-client-handshake = false


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
 

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com