<p>** mysql root 계정 접속</p>
<p>&gt;su root</p>
<p>&gt;mysql -u root -p&nbsp;</p>
<p>--------------------------------------</p>
<p>my.cnf ---&gt; /etc/mysql/mysql.conf.d/mysqld.cnf</p>
<h2 style="box-sizing: border-box; margin-top: 20px; margin-bottom: 10px; font-weight: 500; line-height: 1.2; font-size: 30px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;"><span class="mw-headline" id=".EB.AC.B8.EC.A0.9C.EC.83.81.ED.99.A9" style="box-sizing: border-box; cursor: pointer;"><span class="mw-headline-number" style="box-sizing: border-box; color: #3399dd;">1</span>&nbsp;문제상황</span><span class="mw-editsection" style="box-sizing: border-box; unicode-bidi: isolate;"><a href="https://zetawiki.com/w/index.php?title=MySQL_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9&amp;action=edit&amp;section=1" title="부분 편집: 문제상황" style="box-sizing: border-box; color: #888888; text-decoration-line: none; background-color: transparent; word-break: break-all; white-space: nowrap; padding: 0.2em 0.4em; border-radius: 9px; font-size: 0.7em; opacity: 0.3;" target="_blank"></a></span></h2>
<ul style="box-sizing: border-box; margin: 0.3em 0px 0px 1.6em; padding: 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;">
   <li style="box-sizing: border-box;">MySQL을 설치하면 기본적으로 로컬(localhost)에서만 접속이 가능하고 외부에서는 접속이 불가능하게 되어 있다.</li>
   </ul>
<dl style="box-sizing: border-box; margin: 0.3em 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;">
   <dd style="box-sizing: border-box; margin-bottom: 0.1em; margin-left: 1.6em;">외부에서 접속해보면 다음과 같은 오류 메시지가 나온다.<span id="cite_ref-1" class="reference" style="box-sizing: border-box; position: relative; font-size: 12px; line-height: 0; vertical-align: baseline; top: -0.5em; unicode-bidi: isolate; white-space: nowrap;"><a href="https://zetawiki.com/wiki/MySQL_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9#cite_note-1" style="box-sizing: border-box; color: #0099dd; text-decoration-line: none; background-color: transparent; word-break: break-all;" target="_blank">[1]</a></span></dd>
   </dl>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">text</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell text" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-text mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 4; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span>Host '135.79.246.80' is not allowed to connect to this MySQL server
</pre>
            </div>
         </div>
      </div>
   </div>
<ul style="box-sizing: border-box; margin: 0.3em 0px 0px 1.6em; padding: 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;">
   <li style="box-sizing: border-box;"><a href="https://zetawiki.com/wiki/Toad_for_MySQL" class="mw-redirect" title="Toad for MySQL" style="box-sizing: border-box; color: #0099dd; text-decoration-line: none; background-color: transparent; word-break: break-all;" target="_blank">Toad for MySQL</a>과 같은 DB 관리 도구를 사용하여 DB에 원격으로 접속하려면 허용해주는 로컬 작업이 필요하다.</li>
   <li style="box-sizing: border-box;">여기서는 root를 원격에서 접속할 수 있도록 설정한다. 이것을 응용하면 다른 계정에도 적용할 수 있다..</li>
   </ul>
<h2 style="box-sizing: border-box; margin-top: 20px; margin-bottom: 10px; font-weight: 500; line-height: 1.2; font-size: 30px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;"><span id="확인" style="box-sizing: border-box;"></span><span class="mw-headline" id=".ED.99.95.EC.9D.B8" style="box-sizing: border-box; cursor: pointer;"><span class="mw-headline-number" style="box-sizing: border-box; color: #3399dd;">2</span>&nbsp;확인</span><span class="mw-editsection" style="box-sizing: border-box; unicode-bidi: isolate;"><a href="https://zetawiki.com/w/index.php?title=MySQL_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9&amp;action=edit&amp;section=2" title="부분 편집: 확인" style="box-sizing: border-box; color: #888888; text-decoration-line: none; background-color: transparent; word-break: break-all; white-space: nowrap; padding: 0.2em 0.4em; border-radius: 9px; font-size: 0.7em; opacity: 0.3;" target="_blank"></a></span></h2>
<ul style="box-sizing: border-box; margin: 0.3em 0px 0px 1.6em; padding: 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;">
   <li style="box-sizing: border-box;">로컬에서 접속하여 아래 쿼리를 날려보면 localhost가 나온다.</li>
   </ul>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">Console</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell console" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; color: #ffffff !important; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 8; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="go" style="box-sizing: border-box; color: #dddddd !important;">mysql&gt; SELECT Host,User,plugin,authentication_string FROM mysql.user;</span><span class="go" style="box-sizing: border-box; color: #dddddd !important;">+-----------+------+-----------------------+-------------------------------------------+</span><span class="go" style="box-sizing: border-box; color: #dddddd !important;">| Host      | User | plugin                | authentication_string                     |</span><span class="go" style="box-sizing: border-box; color: #dddddd !important;">+-----------+------+-----------------------+-------------------------------------------+</span><span class="go" style="box-sizing: border-box; color: #dddddd !important;">| localhost | root | mysql_native_password | *8024A6913C57E024BDFC6E813A57DFB924E6803A |</span><span class="go" style="box-sizing: border-box; color: #dddddd !important;">|&nbsp;%         | root |                       |                                           |</span><span class="go" style="box-sizing: border-box; color: #dddddd !important;">+-----------+------+-----------------------+-------------------------------------------+</span><span class="go" style="box-sizing: border-box; color: #dddddd !important;">2 rows in set (0.000 sec)</span></pre>
            </div>
         </div>
      </div>
   </div>
<dl style="box-sizing: border-box; margin: 0.3em 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;">
   <dd style="box-sizing: border-box; margin-bottom: 0.1em; margin-left: 1.6em;">즉 root 계정으로는 로컬에서만 접속가능하다.</dd>
   <dd style="box-sizing: border-box; margin-bottom: 0.1em; margin-left: 1.6em;">(같은 방법으로 root 대신 다른 사용자명도 조회할 수 있다.)</dd>
   <dd style="box-sizing: border-box; margin-bottom: 0.1em; margin-left: 1.6em;">버전이&nbsp;<span style="box-sizing: border-box; font-weight: bolder;">5.7 이하</span>에선&nbsp;<span style="box-sizing: border-box; font-weight: bolder;">authentication_string</span>&nbsp;이 아닌&nbsp;<span style="box-sizing: border-box; font-weight: bolder;">password</span>&nbsp;로 사용하여야 한다.<span id="cite_ref-2" class="reference" style="box-sizing: border-box; position: relative; font-size: 12px; line-height: 0; vertical-align: baseline; top: -0.5em; unicode-bidi: isolate; white-space: nowrap;"><a href="https://zetawiki.com/wiki/MySQL_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9#cite_note-2" style="box-sizing: border-box; color: #0099dd; text-decoration-line: none; background-color: transparent; word-break: break-all;" target="_blank">[2]</a></span></dd>
   </dl>
<h2 style="box-sizing: border-box; margin-top: 20px; margin-bottom: 10px; font-weight: 500; line-height: 1.2; font-size: 30px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;"><span id="변경" style="box-sizing: border-box;"></span><span class="mw-headline" id=".EB.B3.80.EA.B2.BD" style="box-sizing: border-box; cursor: pointer;"><span class="mw-headline-number" style="box-sizing: border-box; color: #3399dd;">3</span>&nbsp;변경</span><span class="mw-editsection" style="box-sizing: border-box; unicode-bidi: isolate;"><a href="https://zetawiki.com/w/index.php?title=MySQL_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9&amp;action=edit&amp;section=3" title="부분 편집: 변경" style="box-sizing: border-box; color: #888888; text-decoration-line: none; background-color: transparent; word-break: break-all; white-space: nowrap; padding: 0.2em 0.4em; border-radius: 9px; font-size: 0.7em; opacity: 0.3;" target="_blank"></a></span></h2>
<ul style="box-sizing: border-box; margin: 0.3em 0px 0px 1.6em; padding: 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;">
   <li style="box-sizing: border-box;">아래에서 '아이디'는 root로 해도 되지만, root가 아닌 별도의 아이디를 사용하는 것이 보안상 유리하다.</li>
   </ul>
<h3 style="box-sizing: border-box; margin-top: 20px; margin-bottom: 10px; font-weight: 500; line-height: 1.2; font-size: 24px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;"><span id="모든_IP_허용" style="box-sizing: border-box;"></span><span class="mw-headline" id=".EB.AA.A8.EB.93.A0_IP_.ED.97.88.EC.9A.A9" style="box-sizing: border-box; cursor: pointer;"><span class="mw-headline-number" style="box-sizing: border-box; color: #3399dd;">3.1</span>&nbsp;모든 IP 허용</span><span class="mw-editsection" style="box-sizing: border-box; unicode-bidi: isolate;"><a href="https://zetawiki.com/w/index.php?title=MySQL_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9&amp;action=edit&amp;section=4" title="부분 편집: 모든 IP 허용" style="box-sizing: border-box; color: #888888; text-decoration-line: none; background-color: transparent; word-break: break-all; white-space: nowrap; padding: 0.2em 0.4em; border-radius: 9px; font-size: 0.7em; opacity: 0.3;" target="_blank"></a></span></h3>
<ul style="box-sizing: border-box; margin: 0.3em 0px 0px 1.6em; padding: 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;">
   <li style="box-sizing: border-box;">참고로 %은 모든 아이피를 포함하지만, localhost는 포함되지 않는다.</li>
   </ul>
<div class="mw-highlight-header" style="box-sizing: border-box; display: table; border-left: 4px solid rgb(85, 153, 187); padding: 0px 12px; margin-bottom: -5px; word-break: break-all; background: rgba(170, 221, 221, 0.667); border-radius: 5px 5px 0px 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium;"><span style="box-sizing: border-box; font-weight: bolder;">방법1. GRANT</span></div>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">MySQL</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell mysql" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-mysql mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 4; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">GRANT</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ALL</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">PRIVILEGES</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ON</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="p" style="box-sizing: border-box;">.</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">TO</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'아이디'</span><span class="nv" style="box-sizing: border-box; color: #6c71c4;">@'%'</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">IDENTIFIED</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">BY</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'패스워드'</span><span class="p" style="box-sizing: border-box;">;</span></pre>
            </div>
         </div>
      </div>
   </div>
<div class="mw-highlight-header" style="box-sizing: border-box; display: table; border-left: 4px solid rgb(85, 153, 187); padding: 0px 12px; margin-bottom: -5px; word-break: break-all; background: rgba(170, 221, 221, 0.667); border-radius: 5px 5px 0px 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium;"><span style="box-sizing: border-box; font-weight: bolder;">방법2. INSERT+GRANT+FLUSH</span></div>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">MySQL</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell mysql" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-mysql mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 4; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">INSERT</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">INTO</span><span class="n" style="box-sizing: border-box;">mysql</span><span class="p" style="box-sizing: border-box;">.</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">user</span><span class="p" style="box-sizing: border-box;">(</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">host</span><span class="p" style="box-sizing: border-box;">,</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">user</span><span class="p" style="box-sizing: border-box;">,</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">password</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">ssl_cipher</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">x509_issuer</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">x509_subject</span><span class="p" style="box-sizing: border-box;">)</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">VALUES</span><span class="p" style="box-sizing: border-box;">(</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'%'</span><span class="p" style="box-sizing: border-box;">,</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'아이디'</span><span class="p" style="box-sizing: border-box;">,</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">password</span><span class="p" style="box-sizing: border-box;">(</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'패스워드'</span><span class="p" style="box-sizing: border-box;">),</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">''</span><span class="p" style="box-sizing: border-box;">,</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">''</span><span class="p" style="box-sizing: border-box;">,</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">''</span><span class="p" style="box-sizing: border-box;">);</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">GRANT</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ALL</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">PRIVILEGES</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ON</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="p" style="box-sizing: border-box;">.</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">TO</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'아이디'</span><span class="nv" style="box-sizing: border-box; color: #6c71c4;">@'%'</span><span class="p" style="box-sizing: border-box;">;</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">FLUSH</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">PRIVILEGES</span><span class="p" style="box-sizing: border-box;">;</span></pre>
            </div>
         </div>
      </div>
   </div>
<h3 style="box-sizing: border-box; margin-top: 20px; margin-bottom: 10px; font-weight: 500; line-height: 1.2; font-size: 24px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;"><span id="IP_대역_허용" style="box-sizing: border-box;"></span><span class="mw-headline" id="IP_.EB.8C.80.EC.97.AD_.ED.97.88.EC.9A.A9" style="box-sizing: border-box; cursor: pointer;"><span class="mw-headline-number" style="box-sizing: border-box; color: #3399dd;">3.2</span>&nbsp;IP 대역 허용</span><span class="mw-editsection" style="box-sizing: border-box; unicode-bidi: isolate;"><a href="https://zetawiki.com/w/index.php?title=MySQL_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9&amp;action=edit&amp;section=5" title="부분 편집: IP 대역 허용" style="box-sizing: border-box; color: #888888; text-decoration-line: none; background-color: transparent; word-break: break-all; white-space: nowrap; padding: 0.2em 0.4em; border-radius: 9px; font-size: 0.7em; opacity: 0.3;" target="_blank"></a></span></h3>
<ul style="box-sizing: border-box; margin: 0.3em 0px 0px 1.6em; padding: 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;">
   <li style="box-sizing: border-box;">예: 111.222.xxx.xxx</li>
   </ul>
<div class="mw-highlight-header" style="box-sizing: border-box; display: table; border-left: 4px solid rgb(85, 153, 187); padding: 0px 12px; margin-bottom: -5px; word-break: break-all; background: rgba(170, 221, 221, 0.667); border-radius: 5px 5px 0px 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium;"><span style="box-sizing: border-box; font-weight: bolder;">방법1. GRANT</span></div>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">MySQL</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell mysql" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-mysql mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 4; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">GRANT</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ALL</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">PRIVILEGES</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ON</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="p" style="box-sizing: border-box;">.</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">TO</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'아이디'</span><span class="nv" style="box-sizing: border-box; color: #6c71c4;">@'111.222.%'</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">IDENTIFIED</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">BY</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'패스워드'</span><span class="p" style="box-sizing: border-box;">;</span></pre>
            </div>
         </div>
      </div>
   </div>
<div class="mw-highlight-header" style="box-sizing: border-box; display: table; border-left: 4px solid rgb(85, 153, 187); padding: 0px 12px; margin-bottom: -5px; word-break: break-all; background: rgba(170, 221, 221, 0.667); border-radius: 5px 5px 0px 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium;"><span style="box-sizing: border-box; font-weight: bolder;">방법2. INSERT+GRANT+FLUSH</span></div>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">sql</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell sql" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 4; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">INSERT</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">INTO</span><span class="n" style="box-sizing: border-box;">mysql</span><span class="p" style="box-sizing: border-box;">.</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">user</span><span class="p" style="box-sizing: border-box;">(</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">host</span><span class="p" style="box-sizing: border-box;">,</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">user</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">password</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">ssl_cipher</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">x509_issuer</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">x509_subject</span><span class="p" style="box-sizing: border-box;">)</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">VALUES</span><span class="p" style="box-sizing: border-box;">(</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'111.222.%'</span><span class="p" style="box-sizing: border-box;">,</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'아이디'</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">password</span><span class="p" style="box-sizing: border-box;">(</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'패스워드'</span><span class="p" style="box-sizing: border-box;">),</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">''</span><span class="p" style="box-sizing: border-box;">,</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">''</span><span class="p" style="box-sizing: border-box;">,</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">''</span><span class="p" style="box-sizing: border-box;">);</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">GRANT</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ALL</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">PRIVILEGES</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ON</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="p" style="box-sizing: border-box;">.</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">TO</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'아이디'</span><span class="o" style="box-sizing: border-box; color: inherit;">@</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'111.222.%'</span><span class="p" style="box-sizing: border-box;">;</span><span class="n" style="box-sizing: border-box;">FLUSH</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">PRIVILEGES</span><span class="p" style="box-sizing: border-box;">;</span></pre>
            </div>
         </div>
      </div>
   </div>
<dl style="box-sizing: border-box; margin: 0.3em 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;">
   <dd style="box-sizing: border-box; margin-bottom: 0.1em; margin-left: 1.6em;">→ 111.222로 시작하는 모든 IP가 허용된다.</dd>
   </dl>
<h3 style="box-sizing: border-box; margin-top: 20px; margin-bottom: 10px; font-weight: 500; line-height: 1.2; font-size: 24px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;"><span id="특정_IP_1개_허용" style="box-sizing: border-box;"></span><span class="mw-headline" id=".ED.8A.B9.EC.A0.95_IP_1.EA.B0.9C_.ED.97.88.EC.9A.A9" style="box-sizing: border-box; cursor: pointer;"><span class="mw-headline-number" style="box-sizing: border-box; color: #3399dd;">3.3</span>&nbsp;특정 IP 1개 허용</span><span class="mw-editsection" style="box-sizing: border-box; unicode-bidi: isolate;"><a href="https://zetawiki.com/w/index.php?title=MySQL_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9&amp;action=edit&amp;section=6" title="부분 편집: 특정 IP 1개 허용" style="box-sizing: border-box; color: #888888; text-decoration-line: none; background-color: transparent; word-break: break-all; white-space: nowrap; padding: 0.2em 0.4em; border-radius: 9px; font-size: 0.7em; opacity: 0.3;" target="_blank"></a></span></h3>
<ul style="box-sizing: border-box; margin: 0.3em 0px 0px 1.6em; padding: 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;">
   <li style="box-sizing: border-box;">예: 111.222.33.44</li>
   </ul>
<div class="mw-highlight-header" style="box-sizing: border-box; display: table; border-left: 4px solid rgb(85, 153, 187); padding: 0px 12px; margin-bottom: -5px; word-break: break-all; background: rgba(170, 221, 221, 0.667); border-radius: 5px 5px 0px 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium;"><span style="box-sizing: border-box; font-weight: bolder;">방법1. GRANT</span></div>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">MySQL</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell mysql" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-mysql mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 4; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">GRANT</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ALL</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">PRIVILEGES</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ON</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="p" style="box-sizing: border-box;">.</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">TO</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'아이디'</span><span class="nv" style="box-sizing: border-box; color: #6c71c4;">@'111.222.33.44'</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">IDENTIFIED</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">BY</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'패스워드'</span><span class="p" style="box-sizing: border-box;">;</span></pre>
            </div>
         </div>
      </div>
   </div>
<div class="mw-highlight-header" style="box-sizing: border-box; display: table; border-left: 4px solid rgb(85, 153, 187); padding: 0px 12px; margin-bottom: -5px; word-break: break-all; background: rgba(170, 221, 221, 0.667); border-radius: 5px 5px 0px 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium;"><span style="box-sizing: border-box; font-weight: bolder;">방법2. INSERT+GRANT+FLUSH</span></div>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">sql</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell sql" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 4; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">INSERT</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">INTO</span><span class="n" style="box-sizing: border-box;">mysql</span><span class="p" style="box-sizing: border-box;">.</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">user</span><span class="p" style="box-sizing: border-box;">(</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">host</span><span class="p" style="box-sizing: border-box;">,</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">user</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">password</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">ssl_cipher</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">x509_issuer</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">x509_subject</span><span class="p" style="box-sizing: border-box;">)</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">VALUES</span><span class="p" style="box-sizing: border-box;">(</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'111.222.33.44'</span><span class="p" style="box-sizing: border-box;">,</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'아이디'</span><span class="p" style="box-sizing: border-box;">,</span><span class="n" style="box-sizing: border-box;">password</span><span class="p" style="box-sizing: border-box;">(</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'패스워드'</span><span class="p" style="box-sizing: border-box;">),</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">''</span><span class="p" style="box-sizing: border-box;">,</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">''</span><span class="p" style="box-sizing: border-box;">,</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">''</span><span class="p" style="box-sizing: border-box;">);</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">GRANT</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ALL</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">PRIVILEGES</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">ON</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="p" style="box-sizing: border-box;">.</span><span class="o" style="box-sizing: border-box; color: inherit;">*</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">TO</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'아이디'</span><span class="o" style="box-sizing: border-box; color: inherit;">@</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'111.222.33.44'</span><span class="p" style="box-sizing: border-box;">;</span><span class="n" style="box-sizing: border-box;">FLUSH</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">PRIVILEGES</span><span class="p" style="box-sizing: border-box;">;</span></pre>
            </div>
         </div>
      </div>
   </div>
<h2 style="box-sizing: border-box; margin-top: 20px; margin-bottom: 10px; font-weight: 500; line-height: 1.2; font-size: 30px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;"><span id="원래_상태로_복구" style="box-sizing: border-box;"></span><span class="mw-headline" id=".EC.9B.90.EB.9E.98_.EC.83.81.ED.83.9C.EB.A1.9C_.EB.B3.B5.EA.B5.AC" style="box-sizing: border-box; cursor: pointer;"><span class="mw-headline-number" style="box-sizing: border-box; color: #3399dd;">4</span>&nbsp;원래 상태로 복구</span><span class="mw-editsection" style="box-sizing: border-box; unicode-bidi: isolate;"><a href="https://zetawiki.com/w/index.php?title=MySQL_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9&amp;action=edit&amp;section=7" title="부분 편집: 원래 상태로 복구" style="box-sizing: border-box; color: #888888; text-decoration-line: none; background-color: transparent; word-break: break-all; white-space: nowrap; padding: 0.2em 0.4em; border-radius: 9px; font-size: 0.7em; opacity: 0.3;" target="_blank"></a></span></h2>
<ul style="box-sizing: border-box; margin: 0.3em 0px 0px 1.6em; padding: 0px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;">
   <li style="box-sizing: border-box;">모든 IP를 허용한 경우 다음과 같이 원래 상태로 복구할 수 있다.</li>
   </ul>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">sql</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell sql" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 4; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">DELETE</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">FROM</span><span class="n" style="box-sizing: border-box;">mysql</span><span class="p" style="box-sizing: border-box;">.</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">user</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">WHERE</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">Host</span><span class="o" style="box-sizing: border-box; color: inherit;">=</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'%'</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">AND</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">User</span><span class="o" style="box-sizing: border-box; color: inherit;">=</span><span class="s1" style="box-sizing: border-box; color: #ba2121;">'아이디'</span><span class="p" style="box-sizing: border-box;">;</span><span class="n" style="box-sizing: border-box;">FLUSH</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">PRIVILEGES</span><span class="p" style="box-sizing: border-box;">;</span></pre>
            </div>
         </div>
      </div>
   </div>
<h2 style="box-sizing: border-box; margin-top: 20px; margin-bottom: 10px; font-weight: 500; line-height: 1.2; font-size: 30px; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;"><span id="LISTEN_IP대역_변경" style="box-sizing: border-box;"></span><span class="mw-headline" id="LISTEN_IP.EB.8C.80.EC.97.AD_.EB.B3.80.EA.B2.BD" style="box-sizing: border-box; cursor: pointer;"><span class="mw-headline-number" style="box-sizing: border-box; color: #3399dd;">5</span>&nbsp;LISTEN IP대역 변경</span><span class="mw-editsection" style="box-sizing: border-box; unicode-bidi: isolate;"><a href="https://zetawiki.com/w/index.php?title=MySQL_%EC%9B%90%EA%B2%A9_%EC%A0%91%EC%86%8D_%ED%97%88%EC%9A%A9&amp;action=edit&amp;section=8" title="부분 편집: LISTEN IP대역 변경" style="box-sizing: border-box; color: #888888; text-decoration-line: none; background-color: transparent; word-break: break-all; white-space: nowrap; padding: 0.2em 0.4em; border-radius: 9px; font-size: 0.7em; opacity: 0.3;" target="_blank"></a></span></h2>
<div class="rellink boilerplate seealso" style="box-sizing: border-box; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; font-size: medium; background-color: #ffffff;"><img alt="" src="https://z-images.s3.amazonaws.com/thumb/e/ec/Crystal_Clear_app_xmag.svg/16px-Crystal_Clear_app_xmag.svg.png" decoding="async" width="16" height="16" data-url="https://z-images.s3.amazonaws.com/thumb/e/ec/Crystal_Clear_app_xmag.svg/16px-Crystal_Clear_app_xmag.svg.png" data-srcset="https://z-images.s3.amazonaws.com/thumb/e/ec/Crystal_Clear_app_xmag.svg/24px-Crystal_Clear_app_xmag.svg.png 1.5x, https://z-images.s3.amazonaws.com/thumb/e/ec/Crystal_Clear_app_xmag.svg/32px-Crystal_Clear_app_xmag.svg.png 2x" style="box-sizing: border-box; vertical-align: middle; border-style: none; max-width: 100%;" />&nbsp;<a href="https://zetawiki.com/wiki/MySQL_bind-address_%EB%B3%80%EA%B2%BD" class="mw-redirect" title="MySQL bind-address 변경" style="box-sizing: border-box; color: #0099dd; text-decoration-line: none; background-color: transparent; word-break: break-all;" target="_blank">MySQL bind-address 변경</a>&nbsp;문서를 참고하십시오.</div>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">Console</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell console" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; color: #ffffff !important; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 8; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="gp" style="box-sizing: border-box; font-weight: bold; color: #aaaaff !important;">root@zetawiki:~# </span>netstat -ntlp <span class="p" style="box-sizing: border-box;">|</span> grep mysqld
<span class="go" style="box-sizing: border-box; color: #dddddd !important;">tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      7931/mysqld</span></pre>
            </div>
         </div>
      </div>
   </div>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">Console</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell console" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; color: #ffffff !important; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 8; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="gp" style="box-sizing: border-box; font-weight: bold; color: #aaaaff !important;">root@zetawiki:~# </span>vi /etc/mysql/my.cnf
</pre>
            </div>
         </div>
      </div>
   </div>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">ini</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell ini" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-ini mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 4; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="c1" style="box-sizing: border-box; color: #449988; font-style: inherit;">#bind-address            = 127.0.0.1</span><span class="k" style="box-sizing: border-box; color: #859900; font-weight: bold;">[mysqld]</span><span class="na" style="box-sizing: border-box; color: #7d9029;">bind-address</span><span class="o" style="box-sizing: border-box; color: inherit;">=</span><span class="s" style="box-sizing: border-box; color: #ba2121;">0.0.0.0</span></pre>
            </div>
         </div>
      </div>
   </div>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">Console</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell console" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; color: #ffffff !important; position: relative;">
            <pre style="box-sizing: border-box; line-height: 20px; font-family: NanumGothicCoding, Consolas, monospace; font-size: 16px; margin-top: 0px; margin-bottom: 0px; overflow: auto; color: inherit; tab-size: 8; position: relative; white-space: pre-wrap; word-break: break-all; background-color: inherit; background-size: 10px, 30px, 10px 10px, 30px 30px; border: 0px; border-radius: 0px; padding: 16px;"><span style="box-sizing: border-box;"></span><span class="gp" style="box-sizing: border-box; font-weight: bold; color: #aaaaff !important;">root@zetawiki:~# </span>service mysql restart
<span class="go" style="box-sizing: border-box; color: #dddddd !important;">mysql stop/waiting</span><span class="go" style="box-sizing: border-box; color: #dddddd !important;">mysql start/running, process 8190</span></pre>
            </div>
         </div>
      </div>
   </div>
<div class="runbox" style="box-sizing: border-box; font-size: 14px; line-height: 1.4; font-family: 나눔고딕, nanumgothic, se_NanumGothic, sans-serif, simhei, AppleSDGothicNeo-Regular, &quot;Malgun Gothic&quot;, dotum; background-color: #ffffff;">
   <div class="hlctl" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 1px 1px 0px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; display: flex; width: 1211px;">
      <div class="left" style="box-sizing: border-box; padding: 8px 1rem; flex: 1 1 auto;">Console</div>
      <div data-title="Copy" class="right-btn" style="box-sizing: border-box; cursor: pointer; padding: 8px 1rem;"><span style="box-sizing: border-box;"><i class="mdi mdi-content-copy" style="box-sizing: border-box;"></i>&nbsp;Copy</span></div>
      </div>
   <div class="cell console" style="box-sizing: border-box; background: rgba(85, 153, 187, 0.2); border-width: 0px 1px 1px; border-style: solid; border-color: rgba(136, 136, 136, 0.2); border-image: initial; position: relative;">
      <div style="box-sizing: border-box;">
         <div class="mw-highlight mw-highlight-lang-console mw-content-ltr" dir="ltr" style="box-sizing: border-box; background: rgb(247, 248, 249); unicode-bidi: embed; color: #ffffff !important; position: relative;">&nbsp;</div>
         </div>
      </div>
   </div>