{"id":2204,"date":"2011-06-30T10:47:30","date_gmt":"2011-06-30T01:47:30","guid":{"rendered":"http:\/\/pchero21.com\/?p=2204"},"modified":"2011-06-30T10:47:30","modified_gmt":"2011-06-30T01:47:30","slug":"mysql-projectmysql-%ec%97%b0%eb%8f%99-2-%ed%99%98%ea%b2%bd-%ea%b5%ac%ec%84%b1","status":"publish","type":"post","link":"http:\/\/pchero21.com\/?p=2204","title":{"rendered":"MySQL : Project(MySQL \uc5f0\ub3d9) 2 \u2013 \ud658\uacbd \uad6c\uc131"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h1><strong>1.\u00a0 MySQL \uc124\uce58 <\/strong><\/h1>\n<p>\uc791\uc5c5\uc758 \ub300\ubd80\ubd84\uc740 Ubuntu &#8211; 10.04 \ubc84\uc804\uc5d0\uc11c \uc9c4\ud589\ud558\uc600\ub2e4.<\/p>\n<p>Ubuntu Linux\uc758 \uacbd\uc6b0 MySQL \uc740 \uae30\ubcf8\uc801\uc73c\ub85c \uc124\uce58\uac00 \ub418\uc5b4\uc788\uc73c\ub098, \ub2e4\ub978 Linux \ubc30\ud3ec\ud310\uc758 \uacbd\uc6b0, \uc124\uce58\uac00 \uc548\ub418\uc5b4 \uc788\uac70\ub098 \ub530\ub85c \uc124\uce58\ub97c \ud574\uc57c\ud560 \uacbd\uc6b0\uac00 \uc788\ub2e4.<\/p>\n<p>\uc774\ub7f4 \uacbd\uc6b0, \ub300\ubd80\ubd84\uc758 \ucd5c\uc2e0\uc758 \ubc30\ud3ec\ud310\ub4e4\uc740 \ub2e4\uc74c\uc758 \uba85\ub839\uc5b4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uac04\ub2e8\ud558\uac8c \uc124\uce58\ub97c \uc9c4\ud589\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p>apt-get \uc744 \uc774\uc6a9\ud560 \uacbd\uc6b0<\/p>\n<blockquote><p># apt-get install mysql<\/p><\/blockquote>\n<p>yum \uc744 \uc774\uc6a9\ud560 \uacbd\uc6b0<\/p>\n<blockquote><p># yum install mysql<\/p><\/blockquote>\n<p>\uc774\ubc88 \ud504\ub85c\uc81d\ud2b8\uc5d0\uc11c \uc0ac\uc6a9\ud55c MySQL\uc758 \ubc84\uc804\uc740 5.1.41 \ubc84\uc804\uc774\ub2e4.<\/p>\n<p>MySQL \ubc84\uc804 \ud655\uc778\ud558\uae30<\/p>\n<blockquote><p># mysql &#8211;version<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<h1><strong>2. MySQL Options<\/strong><\/h1>\n<p>ubuntu \ud658\uacbd\uc5d0\uc11c apt-get \uc73c\ub85c MySQL\uc744 \uc124\uce58 \ud588\uc744 \uacbd\uc6b0, \uae30\ubcf8\uc801\uc73c\ub85c \uc124\uc815\ub418\ub294 database directory\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n<blockquote><p>\/var\/lib\/mysql<\/p><\/blockquote>\n<p>\ub9cc\uc57d \uc704\uc758 \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc874\uc7ac\ud558\uc9c0 \uc54a\ub294\ub2e4\uba74, \/etc\/mysql\/my.cnf \ud30c\uc77c\uc744 \ud1b5\ud574\uc11c database directory \uc758 \uc704\uce58\ub97c \ud655\uc778\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p>\uc544\ub798\ub294 \ud544\uc790\uc758 my.cnf \ud30c\uc77c\uc758 \ub0b4\uc6a9\uc774\ub2e4.<\/p>\n<blockquote><p>#<br \/>\n# The MySQL database server configuration file.<br \/>\n#<br \/>\n# You can copy this to one of:<br \/>\n# &#8211; &#8220;\/etc\/mysql\/my.cnf&#8221; to set global options,<br \/>\n# &#8211; &#8220;~\/.my.cnf&#8221; to set user-specific options.<br \/>\n#<br \/>\n# One can use all long options that the program supports.<br \/>\n# Run program with &#8211;help to get a list of available options and with<br \/>\n# &#8211;print-defaults to see which it would actually understand and use.<br \/>\n#<br \/>\n# For explanations see<br \/>\n# http:\/\/dev.mysql.com\/doc\/mysql\/en\/server-system-variables.html<\/p>\n<p># This will be passed to all mysql clients<br \/>\n# It has been reported that passwords should be enclosed with ticks\/quotes<br \/>\n# escpecially if they contain &#8220;#&#8221; chars&#8230;<br \/>\n# Remember to edit \/etc\/mysql\/debian.cnf when changing the socket location.<br \/>\n[client]<br \/>\nport\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = 3306<br \/>\nsocket\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = \/var\/run\/mysqld\/mysqld.sock<\/p>\n<p># Here is entries for some specific programs<br \/>\n# The following values assume you have at least 32M ram<\/p>\n<p># This was formally known as [safe_mysqld]. Both versions are currently parsed.<br \/>\n[mysqld_safe]<br \/>\nsocket\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = \/var\/run\/mysqld\/mysqld.sock<br \/>\nnice\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = 0<\/p>\n<p>[mysqld]<br \/>\n#<br \/>\n# * Basic Settings<br \/>\n#<\/p>\n<p>#<br \/>\n# * IMPORTANT<br \/>\n#\u00a0\u00a0 If you make changes to these settings and your system uses apparmor, you may<br \/>\n#\u00a0\u00a0 also need to also adjust \/etc\/apparmor.d\/usr.sbin.mysqld.<br \/>\n#<\/p>\n<p>user\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = mysql<br \/>\nsocket\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = \/var\/run\/mysqld\/mysqld.sock<br \/>\nport\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = 3306<br \/>\nbasedir\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = \/usr<br \/>\ndatadir\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = \/var\/lib\/mysql<br \/>\ntmpdir\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = \/tmp<br \/>\nskip-external-locking<br \/>\n#<br \/>\n# Instead of skip-networking the default is now to listen only on<br \/>\n# localhost which is more compatible and is not less secure.<br \/>\nbind-address\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = 127.0.0.1<br \/>\n#<br \/>\n# * Fine Tuning<br \/>\n#<br \/>\nkey_buffer\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = 16M<br \/>\nmax_allowed_packet\u00a0\u00a0\u00a0 = 16M<br \/>\nthread_stack\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = 192K<br \/>\nthread_cache_size\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 8<br \/>\n# This replaces the startup script and checks MyISAM tables if needed<br \/>\n# the first time they are touched<br \/>\nmyisam-recover\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = BACKUP<br \/>\n#max_connections\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 100<br \/>\n#table_cache\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 64<br \/>\n#thread_concurrency\u00a0\u00a0\u00a0\u00a0 = 10<br \/>\n#<br \/>\n# * Query Cache Configuration<br \/>\n#<br \/>\nquery_cache_limit\u00a0\u00a0\u00a0 = 1M<br \/>\nquery_cache_size\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 16M<br \/>\n#<br \/>\n# * Logging and Replication<br \/>\n#<br \/>\n# Both location gets rotated by the cronjob.<br \/>\n# Be aware that this log type is a performance killer.<br \/>\n# As of 5.1 you can enable the log at runtime!<br \/>\n#general_log_file\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \/var\/log\/mysql\/mysql.log<br \/>\n#general_log\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 1<\/p>\n<p>log_error\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \/var\/log\/mysql\/error.log<\/p>\n<p># Here you can see queries with especially long duration<br \/>\n#log_slow_queries\u00a0\u00a0\u00a0 = \/var\/log\/mysql\/mysql-slow.log<br \/>\n#long_query_time = 2<br \/>\n#log-queries-not-using-indexes<br \/>\n#<br \/>\n# The following can be used as easy to replay backup logs or for replication.<br \/>\n# note: if you are setting up a replication slave, see README.Debian about<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 other settings you may need to change.<br \/>\n#server-id\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = 1<br \/>\n#log_bin\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = \/var\/log\/mysql\/mysql-bin.log<br \/>\nexpire_logs_days\u00a0\u00a0\u00a0 = 10<br \/>\nmax_binlog_size\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 100M<br \/>\n#binlog_do_db\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = include_database_name<br \/>\n#binlog_ignore_db\u00a0\u00a0\u00a0 = include_database_name<br \/>\n#<br \/>\n# * InnoDB<br \/>\n#<br \/>\n# InnoDB is enabled by default with a 10MB datafile in \/var\/lib\/mysql\/.<br \/>\n# Read the manual for more InnoDB related options. There are many!<br \/>\n#<br \/>\n# * Security Features<br \/>\n#<br \/>\n# Read the manual, too, if you want chroot!<br \/>\n# chroot = \/var\/lib\/mysql\/<br \/>\n#<br \/>\n# For generating SSL certificates I recommend the OpenSSL GUI &#8220;tinyca&#8221;.<br \/>\n#<br \/>\n# ssl-ca=\/etc\/mysql\/cacert.pem<br \/>\n# ssl-cert=\/etc\/mysql\/server-cert.pem<br \/>\n# ssl-key=\/etc\/mysql\/server-key.pem<\/p>\n<p>[mysqldump]<br \/>\nquick<br \/>\nquote-names<br \/>\nmax_allowed_packet\u00a0\u00a0\u00a0 = 16M<\/p>\n<p>[mysql]<br \/>\n#no-auto-rehash\u00a0\u00a0\u00a0 # faster start of mysql but no tab completition<\/p>\n<p>[isamchk]<br \/>\nkey_buffer\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 = 16M<\/p>\n<p>#<br \/>\n# * IMPORTANT: Additional settings that can override those from this file!<br \/>\n#\u00a0\u00a0 The files must end with &#8216;.cnf&#8217;, otherwise they&#8217;ll be ignored.<br \/>\n#<br \/>\n!includedir \/etc\/mysql\/conf.d\/<\/p><\/blockquote>\n<p>\uac01\uac01\uc758 \uc635\uc158\ub4e4\uc758 \uc815\ud655\ud55c \uc758\ubbf8\uc640 \uc0ac\uc6a9\ubc95\uc744 \uc54c\uace0 \uc2f6\ub2e4\uba74 \uc544\ub798\uc758 \ub9c1\ud06c\ub97c \ucc38\uc870\ud55c\ub2e4.<\/p>\n<p><a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/program-options.html\" target=\"_blank\">http:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/program-options.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; 1.\u00a0 MySQL \uc124\uce58 \uc791\uc5c5\uc758 \ub300\ubd80\ubd84\uc740 Ubuntu &#8211; 10.04 \ubc84\uc804\uc5d0\uc11c \uc9c4\ud589\ud558\uc600\ub2e4. Ubuntu Linux\uc758 \uacbd\uc6b0 MySQL \uc740 \uae30\ubcf8\uc801\uc73c\ub85c \uc124\uce58\uac00 \ub418\uc5b4\uc788\uc73c\ub098, \ub2e4\ub978 Linux \ubc30\ud3ec\ud310\uc758 \uacbd\uc6b0, \uc124\uce58\uac00 \uc548\ub418\uc5b4 \uc788\uac70\ub098 \ub530\ub85c \uc124\uce58\ub97c \ud574\uc57c\ud560 \uacbd\uc6b0\uac00 \uc788\ub2e4. \uc774\ub7f4 \uacbd\uc6b0, \ub300\ubd80\ubd84\uc758 \ucd5c\uc2e0\uc758 \ubc30\ud3ec\ud310\ub4e4\uc740 \ub2e4\uc74c\uc758 \uba85\ub839\uc5b4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uac04\ub2e8\ud558\uac8c &hellip; <a href=\"http:\/\/pchero21.com\/?p=2204\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[142,144,272],"_links":{"self":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/2204"}],"collection":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2204"}],"version-history":[{"count":0,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/2204\/revisions"}],"wp:attachment":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2204"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}