{"id":653,"date":"2024-04-15T10:57:07","date_gmt":"2024-04-15T01:57:07","guid":{"rendered":"http:\/\/inwelly.com\/?p=653"},"modified":"2024-04-15T10:57:07","modified_gmt":"2024-04-15T01:57:07","slug":"mysql-mysql-root-%ec%b4%88%ea%b8%b0-%ec%84%a4%ec%a0%95","status":"publish","type":"post","link":"https:\/\/inwelly.com\/?p=653","title":{"rendered":"Mysql : mysql root \ucd08\uae30 \uc124\uc815"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>\uc544\ub798\uc640 \uac19\uc774 \uc124\uc815 \uc0ac\uc6a9 \ud569\ub2c8\ub2e4.\n\nssh#> etc\/init.d\/mysqld start\nssh#> mysql\nmysql#> use mysql;\nmysql#> update user set password=password('root\ud328\uc2a4\uc6cc\ub4dc') where user='root';\nmysql#> flush privileges;\nmysql#> exit;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># 5.7 \uc774\uc0c1\n> update user set authentication_string=password('new password') where user = 'root';\n\n# 8.x \uc774\uc0c1\n> alter user 'root'@'localhost' identified with mysql_native_password by 'new password';<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># 5.6 \uc774\ud558\n> update user set password=password('new password') where user = 'root';<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>create user 'testting'@'localhost' identified by 'password'\n\ngrant all privileges on *.* to 'testting'@'localhost';\n\ncreate database DB\uc774\ub984\n\ngrant all privileges on DB\uc774\ub984.* to 'testting'@'localhost';<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql - \uc0c8\ub85c\uc6b4 \uc0ac\uc6a9\uc790 \ucd94\uac00\nmysql#> use mysql;\nmysql#> create database \ub370\uc774\ud130\ubca0\uc774\uc2a4\uba85 ;\nmysql#> grant all privileges on \ub370\uc774\ud130\ubca0\uc774\uc2a4\uba85.* to \ucd94\uac00\ud558\uace0\uc2f6\uc740\uacc4\uc815\uc544\uc774\ub514@localhost identified by '\ucd94\uac00\ud558\ub294\uacc4\uc815\uc758\ud328\uc2a4\uc6cc\ub4dc' with grant option;\nmysql#> flush privileges ;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[103],"tags":[],"class_list":["post-653","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts\/653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=653"}],"version-history":[{"count":1,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts\/653\/revisions"}],"predecessor-version":[{"id":654,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts\/653\/revisions\/654"}],"wp:attachment":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}