{"id":31,"date":"2024-01-21T22:25:41","date_gmt":"2024-01-21T13:25:41","guid":{"rendered":"https:\/\/blog.gerd.kr\/?p=31"},"modified":"2024-01-25T12:27:47","modified_gmt":"2024-01-25T03:27:47","slug":"truenas-%ec%97%90%ec%84%9c-mariadb%ec%9d%98-root-%ed%8c%a8%ec%8a%a4%ec%9b%8c%eb%93%9c-%ec%9e%ac%ec%84%a4%ec%a0%95","status":"publish","type":"post","link":"https:\/\/blog.gerd.kr\/?p=31","title":{"rendered":"TrueNAS \uc5d0\uc11c MariaDB \uc758 root \ud328\uc2a4\uc6cc\ub4dc \uc7ac\uc124\uc815"},"content":{"rendered":"\n<p> mariaDB ( MySQL ) \ub294 \ubc84\uc83c( 10.4 \uc774\uc0c1 )\uc5d0 \ub530\ub77c \uc778\uc99d \ubc29\uc2dd\uc774 \ub2e4\ub974\ub2e4. \uc2e0\ubc84\uc83c\uc740 \uadf8\ub0e5 \uc124\uce58\ud558\uba74 \uc2dc\uc2a4\ud15c\uc758 root \uacc4\uc815\uc774 \ubc14\ub85c mysql \uc758 \uadf8\uac83\uc73c\ub85c \ub9e4\uce6d\ub418\uc5b4 \ubcc4 \ub2e4\ub978 \uc124\uc815 \uc5c6\uc774 \ubc14\ub85c \uc811\uc18d\ud560 \uc218 \uc788\uac8c \ub418\ub294\ub370, TrueNAS\uc758 Jail \uc5d0\ub294 root \uacc4\uc815\uc5d0 \ube44\ubc00\ubc88\ud638\uac00 \uc124\uc815\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc544 \ub3c4\ub2f9\uccb4 \uc811\uc18d\uc744 \ud560 \uc218\uac00 \uc5c6\ub2e4. \uadf8\ub798\uc11c TrueNAS \uc5d0\uc11c MariaDB \ub97c \uc124\uce58\ud558\uba74 \ubb34\uc870\uac74 \ud55c\ubc88\uc740 root \ud328\uc2a4\uc6cc\ub4dc\ub97c \uc7ac\uc124\uc815 \ud558\uac8c \ub41c\ub2e4. grant table \uac74\ub108\ub6f0\uace0 \uc811\uc18d\ud574\uc11c \ud328\uc2a4\uc6cc\ub4dc \uc7ac\uc124\uc815 \ud558\ub294\uac74 \ub3d9\uc77c\ud55c\ub370, \uc811\uc18d\ud55c \uc9c1\ud6c4\uc5d0 flush privileges \ub97c \ud55c\ubc88 \ud574 \uc918\uc57c \ud55c\ub2e4. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>shell &gt; service mysql-server stop\nstopping mysql.\n....<\/code><\/pre>\n\n\n\n<p>\uc11c\ube44\uc2a4 \uc774\ub984\uc744 \uc798 \ubaa8\ub974\uaca0\uc73c\uba74 \/usr\/local\/etc\/rc.d \uc5d0\uc11c \ud655\uc778\ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>shell &gt; mysql_safe -u root --skip--grant-tables &amp;\nshell &gt; mysql -u root\n....\n<mark style=\"background-color:#ff8737\" class=\"has-inline-color has-black-color\">mysql &gt; flush privileges;<\/mark><\/code><\/pre>\n\n\n\n<p>mysql client \ub85c \uc811\uc18d\ud558\uc790\ub9c8\uc790 reload \ub97c \ud574 \uc918\uc57c \uad8c\ud55c \ud14c\uc774\ube14 \uc2a4\ud0b5 \ud55c \uac83\uc774 \uc801\uc6a9\ub418\ub294 \ubaa8\uc591\uc774\ub2e4. \uc774\uac70 \uc548\ud558\uba74 \uc774\uc0c1\ud55c \uc5d0\ub7ec \uba54\uc2dc\uc9c0\uac00 \ub098\uc624\uba74\uc11c \uc720\uc838 \ud14c\uc774\ube14\uc744 update \ud560 \uc218\uac00 \uc5c6\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql &gt; update user set password=password('root\ud328\uc2a4\uc6cc\ub4dc') where user='root';\nmysql &gt; update user set authentication_string=PASSWORD('audiopmydb') WHERE user='root';\nmysql &gt; ALTER USER 'root'@'localhost' IDENTIFIED BY 'Study3306!';<\/code><\/pre>\n\n\n\n<p>\uc801\ub2f9\ud788 \ub418\ub294 \uac78\ub85c \ud328\uc2a4\uc6cc\ub4dc\ub97c \uc7ac\uc124\uc815\ud558\uace0 \ubcc0\uacbd\ub41c \uad8c\ud55c\uc744 reload \ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql &gt; FLUSH PRIVILEGES;\nmysql &gt; exit;\nBye<\/code><\/pre>\n\n\n\n<p> \ube60\uc838\ub098\uc640\uc11c mysql-server \uc744 \uc7ac\uc2dc\uc791\ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>shell &gt; service mysql-server stop\nshell &gt; service mysql-server start<\/code><\/pre>\n\n\n\n<p> \uc65c\uc778\uc9c0 \ubaa8\ub974\uaca0\ub294\ub370 \uadf8\ub0e5 restart \ud558\ub2c8\uae4c &#8211;skip-grant-tables \uac00 \uc801\uc6a9\ub41c \ucc44\ub85c \uc7ac\uc2dc\uc791\ud558\ub294 \uacbd\uc6b0\uac00 \uc788\uc5c8\ub2e4. <\/p>\n\n\n\n<p>\uc800\ub798\ub3c4 \uc548\ub418\uba74 \uadf8\ub0e5 Jail \uc7ac\uc2dc\uc791&#8230;\u314b\u314b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>mariaDB ( MySQL ) \ub294 \ubc84\uc83c( 10.4 \uc774\uc0c1 )\uc5d0 \ub530\ub77c \uc778\uc99d \ubc29\uc2dd\uc774 \ub2e4\ub974\ub2e4. \uc2e0\ubc84\uc83c\uc740 \uadf8\ub0e5 \uc124\uce58\ud558\uba74 \uc2dc\uc2a4\ud15c\uc758 root \uacc4\uc815\uc774 \ubc14\ub85c mysql \uc758 \uadf8\uac83\uc73c\ub85c \ub9e4\uce6d\ub418\uc5b4 \ubcc4 \ub2e4\ub978 \uc124\uc815 \uc5c6\uc774 \ubc14\ub85c \uc811\uc18d\ud560 \uc218 \uc788\uac8c \ub418\ub294\ub370, TrueNAS\uc758 Jail \uc5d0\ub294 root \uacc4\uc815\uc5d0 \ube44\ubc00\ubc88\ud638\uac00 \uc124\uc815\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc544 \ub3c4\ub2f9\uccb4 \uc811\uc18d\uc744 \ud560 \uc218\uac00 \uc5c6\ub2e4. \uadf8\ub798\uc11c TrueNAS \uc5d0\uc11c MariaDB \ub97c \uc124\uce58\ud558\uba74 \ubb34\uc870\uac74 \ud55c\ubc88\uc740 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[15,14,13,17,18,16,8,20,21,19,22],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-truenas","tag-jail","tag-mariadb","tag-mysql","tag-password","tag-reset","tag-root","tag-truenas","tag-20","tag-21","tag-19","tag-22"],"_links":{"self":[{"href":"https:\/\/blog.gerd.kr\/index.php?rest_route=\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.gerd.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gerd.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gerd.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gerd.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=31"}],"version-history":[{"count":8,"href":"https:\/\/blog.gerd.kr\/index.php?rest_route=\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":72,"href":"https:\/\/blog.gerd.kr\/index.php?rest_route=\/wp\/v2\/posts\/31\/revisions\/72"}],"wp:attachment":[{"href":"https:\/\/blog.gerd.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gerd.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gerd.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}