{"id":519,"date":"2014-12-29T21:47:54","date_gmt":"2014-12-30T06:47:54","guid":{"rendered":"http:\/\/blog.box.kr\/?p=519"},"modified":"2014-12-29T21:47:54","modified_gmt":"2014-12-30T06:47:54","slug":"mysql-%ec%82%ac%ec%9a%a9%ec%9e%90-%ec%83%9d%ec%84%b1%eb%b6%80%ed%84%b0-%ea%b6%8c%ed%95%9c-%eb%b6%80%ec%97%ac-%ea%b9%8c%ec%a7%80","status":"publish","type":"post","link":"https:\/\/blog.box.kr\/?p=519","title":{"rendered":"MYSQL \uc0ac\uc6a9\uc790 \uc0dd\uc131\ubd80\ud130 \uad8c\ud55c \ubd80\uc5ec \uae4c\uc9c0.."},"content":{"rendered":"<p>1. DATABASE \uc0dd\uc131<br \/>\nmysql&gt; <strong>CREATE DATABASE <span style=\"color: #ff0000;\">\ub514\ube44\uba85<\/span><\/strong><\/p>\n<p>2. \uc0ac\uc6a9\uc790 \uc0dd\uc131 \ubc0f \uad8c\ud55c \ubd80\uc5ec<br \/>\nmysql&gt; \u00a0<strong class=\"userinput\"><code>CREATE USER '\uc0ac\uc6a9\uc790\uba85'@'\uc811\uc18d\ud638\uc2a4\ud2b8(localhost, %, ip )' IDENTIFIED BY '\uc554\ud638';<br \/>\n<\/code><\/strong><code>\u00a0 mysql&gt;\u00a0<\/code><strong class=\"userinput\"><code>GRANT ALL PRIVILEGES ON \ub514\ube44\uba85.* TO '\uc0ac\uc6a9\uc790\uba85'@'\uc811\uc18d\ud638\uc2a4\ud2b8(localhost, %, ip )'\u00a0<\/code><\/strong>\u00a0<strong class=\"userinput\"><code>WITH GRANT OPTION;<br \/>\n\ub610\ub294<br \/>\n<\/code><\/strong><code>\u00a0 mysql&gt;<\/code><strong class=\"userinput\"><code> G<\/code><\/strong><strong class=\"userinput\"><code>RANT RELOAD,PROCESS ON \ub514\ube44\uba85.* TO '\uc0ac\uc6a9\uc790\uba85'@'localhost'; \/\/ \uc774\ub807\uac8c \ud544\uc694\ud55c \uad8c\ud55c\ub9cc \ucc0d\uc5b4\uc11c...<\/code><\/strong><\/p>\n<p>3.\u00a0\ud544\uc694 \uc5c6\ub294 \uad8c\ud55c \uc81c\uac70<br \/>\n<code>\u00a0 mysql&gt;<\/code><code> <\/code><strong>show grants for &#8216;<strong class=\"userinput\"><code>\uc0ac\uc6a9\uc790\uba85<\/code><\/strong>&#8216;@&#8217;localhost&#8217;; \u00a0 \/\/ \uad8c\ud55c \ud655\uc778..<br \/>\n<\/strong><code>\u00a0 mysql&gt;<\/code><code> <\/code><strong>REVOKE SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, CREATE TEMPORARY TABLES ON *.* FROM &#8216;<code>\uc0ac\uc6a9\uc790\uba85<\/code>&#8216;@&#8217;localhost&#8217;;<\/strong> <strong><span style=\"color: #ff0000;\">\/\/ \ub0b4 \uad8c\ud55c \uc774\uc678\uc758 \ub514\ube44\ub3c4 \ubcfc\uc218 \uc788\ub294 \uad8c\ud55c \uc81c\uac70..<\/span><\/strong><\/p>\n<p>4. \uc801\uc6a9<br \/>\n<code>\u00a0 mysql&gt;<\/code><code> <\/code><strong>FLUSH PRIVILEGES;<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. DATABASE \uc0dd\uc131 mysql&gt; CREATE DATABASE \ub514\ube44\uba85 2. \uc0ac\uc6a9\uc790 \uc0dd\uc131 \ubc0f \uad8c\ud55c \ubd80\uc5ec mysql&gt; \u00a0CREATE USER &#8216;\uc0ac\uc6a9\uc790\uba85&#8217;@&#8217;\uc811\uc18d\ud638\uc2a4\ud2b8(localhost, %, ip )&#8217; IDENTIFIED BY &#8216;\uc554\ud638&#8217;; \u00a0 mysql&gt;\u00a0GRANT ALL PRIVILEGES ON \ub514\ube44\uba85.* TO &#8216;\uc0ac\uc6a9\uc790\uba85&#8217;@&#8217;\uc811\uc18d\ud638\uc2a4\ud2b8(localhost, %, ip )&#8217;\u00a0\u00a0WITH GRANT OPTION; \ub610\ub294 \u00a0 mysql&gt; GRANT RELOAD,PROCESS ON \ub514\ube44\uba85.* TO &#8216;\uc0ac\uc6a9\uc790\uba85&#8217;@&#8217;localhost&#8217;; \/\/ \uc774\ub807\uac8c \ud544\uc694\ud55c \uad8c\ud55c\ub9cc \ucc0d\uc5b4\uc11c&#8230; 3.\u00a0\ud544\uc694 \uc5c6\ub294 \uad8c\ud55c \uc81c\uac70 \u00a0 mysql&gt; show grants for &#8216;\uc0ac\uc6a9\uc790\uba85&#8216;@&#8217;localhost&#8217;; \u00a0 \/\/ \uad8c\ud55c \ud655\uc778.. \u00a0 mysql&gt; REVOKE SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, CREATE TEMPORARY TABLES ON *.* FROM &#8216;\uc0ac\uc6a9\uc790\uba85&#8216;@&#8217;localhost&#8217;; \/\/ \ub0b4 \uad8c\ud55c \uc774\uc678\uc758 \ub514\ube44\ub3c4 \ubcfc\uc218 \uc788\ub294 \uad8c\ud55c \uc81c\uac70.. 4. \uc801\uc6a9 \u00a0 mysql&gt; FLUSH PRIVILEGES;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"ngg_post_thumbnail":0,"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[12,5],"tags":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5q9Zn-8n","jetpack-related-posts":[{"id":521,"url":"https:\/\/blog.box.kr\/?p=521","url_meta":{"origin":519,"position":0},"title":"MYSql \uc811\uc18d \ud504\ub85c\ud1a0\ucf5c \ubb38\uc81c","date":"2014-12-29","format":false,"excerpt":"Q1. \u00a0Mysql \uc811\uc18d\uc2dc\uc5d0 \"\u00a0MYSQL ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option 'secure_auth' enabled)\u00a0\" \uc624\ub958 \ubc1c\uc0dd \uc6d0\uc778: \uc0ac\uc6a9\uc790 \uc554\ud638 \ud574\uc26c\uac12\uc744 \uc608\uc804 \uac83\uc744 \uc0ac\uc6a9\ud574\uc11c \uc0dd\uae30\ub294 \ubb38\uc81c \ud574\uacb0 1 : \u00a0\u00a0--skip-secure-auth \u00a0\uc635\uc158 \uc0ac\uc6a9 => \uc811\uc18d \ud560\ub54c Mysql\uc758 \ud074\ub77c\uc774\uc5b8\ud2b8\uc758 \uc554\ud638 Hash\uc218\uc900\uc744 \ub0ae \ucdb0\uc11c \uc811\uc18d ( \uc784\uc2dc\uc801\uc778 \ubc29\ubc95 )\u00a0\u2026","rel":"","context":"In &quot;DB\uad00\ub828&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":558,"url":"https:\/\/blog.box.kr\/?p=558","url_meta":{"origin":519,"position":1},"title":"OSX\uc5d0\uc11c GIT \uc11c\ubc84 \uc124\uc815 \ud558\uae30","date":"2015-01-25","format":false,"excerpt":"* Shell \uc5d0\uc11c \uc0ac\uc6a9\uc790 \ucd94\uac00 !! 1. \"sudo dscl . -create \/Users\/username UserShell \u00a0\/bin\/bash\" 2. \"sudo dscl . -create\u00a0\/Users\/username\u00a0RealName \"John Doth\"\" 3. \"sudo dscl . -create\u00a0\/Users\/username\u00a0UniquelID 1001\" 4.\u00a0\"sudo dscl . -create\u00a0\/Users\/username\u00a0PrimaryGroupID\u00a01000\" 5.\u00a0\"sudo dscl . -create\u00a0\/Users\/username\u00a0NFSHomeDirectory \/Local\/Users\/username\" 6.\u00a0\"sudo dscl . -create\u00a0\/Users\/username\u00a0password\" \u00a0 \u00a0<<= \uc554\ud638 \uc785\ub825 * GIT\uc124\uce58 1. \uc0ac\uc6a9\uc790 \"git-admin\" \u00a0\ucd94\uac00\u2026","rel":"","context":"In &quot;\uc77c\uc0c1&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":687,"url":"https:\/\/blog.box.kr\/?p=687","url_meta":{"origin":519,"position":2},"title":"[\ud38c]MariaDB \uc124\uc815 \ud30c\uc77c my.cnf","date":"2015-04-13","format":false,"excerpt":"http:\/\/www.programkr.com\/blog\/MUDM5ADMwYT2.html \u00a0 \u00a0 # MariaDB database server configuration file. # # You can copy this file to one of: # - \"\/etc\/mysql\/my.cnf\" to set global options, # - \"~\/.my.cnf\" to set user-specific options. # # One can use all long options that the program supports. # Run program with --help\u2026","rel":"","context":"In &quot;\uae30\uc220\uc790\ub8cc&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":694,"url":"https:\/\/blog.box.kr\/?p=694","url_meta":{"origin":519,"position":3},"title":"* APM\uc124\uce58","date":"2015-04-15","format":false,"excerpt":"1. \uc124\uc815 \ubc29\ud654\ubcbd \ucf1c\uc838 80 \ud3ec\ud2b8, 3306 \ud3ec\ud2b8 vi \/etc\/sysconfig\/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT \/etc\/init.d\/iptables restart #\ub9c8\uc9c0\ub9c9\uc73c\ub85c \ub2e4\uc2dc \ubc29\ud654\ubcbd \ub54c\ubb38\uc5d0 \uc124\uc815\uc774 \uc801\uc6a9\ub429\ub2c8\ub2e4 2. \ub2eb\uae30SELINUX vi \/etc\/selinux\/config\u2026","rel":"","context":"In &quot;\uae30\uc220\uc790\ub8cc&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":801,"url":"https:\/\/blog.box.kr\/?p=801","url_meta":{"origin":519,"position":4},"title":"[scrap] MySQL Replication \uc124\uc815\uacfc \uba87 \uac00\uc9c0 \ud14c\uc2a4\ud2b8","date":"2015-05-18","format":false,"excerpt":"http:\/\/blog.hibrainapps.net\/130 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 MySQL\uc744 DB\ub85c \uc0ac\uc6a9\ud558\uba74\uc11c \uc11c\ubc84\uc758 \ubd80\ud558 \ubd84\uc0b0\uc744 \uc704\ud55c \ubc29\ubc95 \uc911 \ud558\ub098\ub85c Replication \uc744 \uc0ac\uc6a9\ud55c\ub2e4. Replication \uc740 Master \ud558\ub098\uc5d0 n\uac1c\uc758 Slave\ub85c \uc9c0\uc815\uc774 \uac00\ub2a5\ud558\ub2e4. Slave\ub294 \ub2e4\uc2dc Master \uc5ed\ud560\uc744 \ud560\uc218 \uc788\uc73c\uba70 \uc5ed\uc2dc \ub610 \ub2e4\ub978 n\uac1c\uc758 Slave\ub97c \uc9c0\uc815\ud560 \uc218 \uc788\ub2e4. \ubd80\ud558 \ubd84\uc0b0\uc758 \ud6a8\uacfc\ub294 inser,update \ub4f1 \ubcc0\uacbd\uacfc \uad00\ub828\ub41c \ubaa8\ub4e0 \uc791\uc5c5\uc740\u2026","rel":"","context":"In &quot;DB\uad00\ub828&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":649,"url":"https:\/\/blog.box.kr\/?p=649","url_meta":{"origin":519,"position":5},"title":"[\ud38c]Tomcat7 tomcat-jdbc \uc124\uc815 &#8211; Broken pipe \uc5d0\ub7ec \ud68c\ud53c","date":"2015-04-05","format":false,"excerpt":"tomcat-jdbc\ub85c MySQL\uc5d0 \uc5f0\uacb0\ud55c \uacbd\uc6b0 \"java.net.SocketException: Broken pipe\" \uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ud558\ub294 \uacbd\uc6b0\ub97c \uac00\ub054 \ubcfc \uc218 \uc788\ub2e4. \ub300\ubd80\ubd84\uc758 \uacbd\uc6b0 connection idle time\uc774 MySQL\uc5d0 \uc124\uc815\ub41c wait_timeout\uc744 \uc9c0\ub098\uc11c DB\uc5d0\uc11c \uc5f0\uacb0\uc744 \ub04a\uc740 \uac83\uc774\ub2e4. \uc774\ub97c \ubc29\uc9c0\ud558\ub824\uba74 connection\uc774 \uc77c\uc815 \uae30\uac04\ub3d9\uc548 \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc73c\uba74 close\ub418\ub3c4\ub85d \uc124\uc815\ud558\uac70\ub098 connection \ub300\uc5ec\uc2dc\uc5d0 connection\uc744 \uccb4\ud06c\ud558\ub3c4\ub85d \ud558\uba74 \ub41c\ub2e4. \uc124\uc815 1 - \uc77c\uc815 \uae30\uac04\ub3d9\uc548 \uc0ac\uc6a9\ub418\uc9c0 \uc54a\uc73c\uba74 connection\uc744\u2026","rel":"","context":"In &quot;\uae30\uc220\uc790\ub8cc&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/519"}],"collection":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=519"}],"version-history":[{"count":0,"href":"https:\/\/blog.box.kr\/index.php?rest_route=\/wp\/v2\/posts\/519\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.box.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}