CentOS 6.3 ã« MySQL 5.6 ãã¤ã³ã¹ãã¼ã«ãã¦ã¿ã
MySQLã®ã¤ã³ã¹ãã¼ã«æ¹æ³ãé²åãã¦ããï¼ - sakaikã®æ¥ã
éæã(T)ç·¨
http://d.hatena.ne.jp/sakaik/20130205/mysql5_6_install
ãã¡ãã®è¨äºãèªãã ã使ã£ã¦ã¿ãããªã£ãã®ã§ã MySQL 5.6 ã CentOS 6.3(x86_64) ã«ã¤ã³ã¹ãã¼ã«ãã¦ã¿ã¾ããã
æé ãã»ã¼ä¸è¨è¨äºã¨åãã§ãã
CentOS 6 ãªã®ã§ä»¥ä¸ã®ããã« yum ã« RPM ãã¡ã¤ã«ã® URL ãç´æ¥æå®ãã¦ã¤ã³ã¹ãã¼ã«ã§ãã¾ãã
# yum install http://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.6/MySQL-client-5.6.10-1.el6.x86_64.rpm \ http://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.6/MySQL-shared-compat-5.6.10-1.el6.x86_64.rpm \ http://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.6/MySQL-server-5.6.10-1.el6.x86_64.rpm \ http://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.6/MySQL-devel-5.6.10-1.el6.x86_64.rpm
CentOS 6 ã§ã¯ããã©ã«ã㧠mysql-libs.x86_64 ã® 5.1.61-4.el6 ãã¤ã³ã¹ãã¼ã«ããã¦ããã®ã§ã MySQL-shared-5.6.10-1.el6.x86_64.rpm ã®æ¹ãé¸æããã¨ã¨ã©ã¼ã«ãªã£ã¦ãã¾ãã¾ãã
ãã®ããã MySQL-shared-compat-5.6.10-1.el6.x86_64.rpm ã®æ¹ã使ç¨ãã¦ãã¾ãã
â» 2013/02/26 追è¨
ã³ã¡ã³ãæ¬ã§ id:sh2 ããã«æãã¦ããã ãã¾ããããshared-compat ãã¤ã³ã¹ãã¼ã«ããå¾ã§ããã° shared ã®æ¹ãã¤ã³ã¹ãã¼ã«åºæ¥ãããã§ãã
ã¨ããããã§ã以ä¸ãå®è¡ããMySQL-shared-5.6.10-1.el6.x86_64.rpm ãã¤ã³ã¹ãã¼ã«ãã¦ä¸ããã
# yum install http://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.6/MySQL-shared-5.6.10-1.el6.x86_64.rpm
ã¤ã³ã¹ãã¼ã«ãå®äºããã MySQL ãµã¼ããèµ·åãã¾ãã
# service mysql start
ã¤ã³ã¹ãã¼ã«æã®ã¡ãã»ã¼ã¸ã«æ¸ãã¦ããéãã5.6 ã§ã¯ root ã¦ã¼ã¶ã«åæãã¹ã¯ã¼ããè¨å®ããã¦ããã以ä¸ã®ãã¡ã¤ã«ã«æ¸ãè¾¼ã¾ãã¦ããã®ã§ç¢ºèªãã¾ãã
# cat /root/.mysql_secret # The random password set for the root user at Thu Feb 7 14:24:54 2013 (local time): XXXXXXXX
ä¸è¨ã®ãXXXXXXXXãã®é¨åãåæè¨å®ããã¦ãããã¹ã¯ã¼ãã«ãªãã¾ãã
ããã©ã«ãã®ãã¹ã¯ã¼ãã®ã¾ã¾ã§ã¯ä½ãã§ããªãã®ã§ããã¹ã¯ã¼ãã確èªããã root ã¦ã¼ã¶ã§ MySQL ã«æ¥ç¶ãã¾ãã
# mysql -uroot -p
æ¥ç¶ããã以ä¸ã®ããã«ãã¦ãã¹ã¯ã¼ããå¤æ´ãã¦ä¸æ¦æãã¾ãã
mysql> SET PASSWORD FOR root@localhost=PASSWORD('password'); mysql> exit
ãã㧠mysql_secure_installation ã³ãã³ããå®è¡ã§ããã®ã§å®è¡ãã¾ãã
# mysql_secure_installation
ããã¤ã質åãããã®ã§ãããããã§ã¯ä»¥ä¸ã®ããã«åçãã¾ããã
Change the root password? [Y/n] n # æ¢ã«å ã»ã©å¤æ´ããã®ã§ n Remove anonymous users? [Y/n] Y # å¿åã¦ã¼ã¶ãåé¤ Disallow root login remotely? [Y/n] Y # root ã¦ã¼ã¶ã§ã®ãªã¢ã¼ãããã®ãã°ã¤ã³ãç¦æ¢ Remove test database and access to it? [Y/n] Y # test ãã¼ã¿ãã¼ã¹ãåé¤ Reload privilege tables now? [Y/n] Y # 権éãã¼ãã«ããªãã¼ã
ããã§ã¤ã³ã¹ãã¼ã«ã¯å®äºã§ãã
ä»ã大ããªéãã¨ãã¦ãè¨å®ãã¡ã¤ã«ã§ãã my.cnf 㯠/usr/my.cnf ã®æ¹ã使ç¨ãããããã«ãªã£ãããã§ãã
ãã£ããå ¥ããã®ã§ããããã使ã£ã¦ã¿ããã¨æãã¾ãã