***Kunjungi WEB kami***

ikhwansaputera.com Semua Bisa Dengan Belajar

Cara Reset root Password untuk MySQL 5.7 di Ubuntu 16.04 LTS

03.16.2017 · Posted in Home
<div class="crayon-pre">
<div id="crayon-58ca97e348506966592378-1" class="crayon-line"><span class="crayon-v">sudo</span> <span class="crayon-o">/</span><span class="crayon-v">etc</span><span class="crayon-o">/</span><span class="crayon-v">init</span><span class="crayon-sy">.</span><span class="crayon-v">d</span><span class="crayon-o">/</span><span class="crayon-e">mysql </span><span class="crayon-e">stop</span></div>
<div id="crayon-58ca97e348506966592378-2" class="crayon-line crayon-striped-line"><span class="crayon-e">sudo </span><span class="crayon-v">mkdir</span> <span class="crayon-o">/</span><span class="crayon-t">var</span><span class="crayon-o">/</span><span class="crayon-v">run</span><span class="crayon-o">/</span><span class="crayon-v">mysqld</span><span class="crayon-o">/</span></div>
<div id="crayon-58ca97e348506966592378-3" class="crayon-line"><span class="crayon-e">sudo </span><span class="crayon-e">chown </span><span class="crayon-v">mysql</span> <span class="crayon-o">/</span><span class="crayon-t">var</span><span class="crayon-o">/</span><span class="crayon-v">run</span><span class="crayon-o">/</span><span class="crayon-v">mysqld</span><span class="crayon-o">/</span></div>
<div id="crayon-58ca97e348506966592378-4" class="crayon-line crayon-striped-line"><span class="crayon-e">sudo </span><span class="crayon-v">mysqld_safe</span> <span class="crayon-o">--</span><span class="crayon-v">skip</span><span class="crayon-o">-</span><span class="crayon-v">grant</span><span class="crayon-o">-</span><span class="crayon-v">tables</span> <span class="crayon-o">&</span></div>
<div id="crayon-58ca97e348506966592378-5" class="crayon-line"><span class="crayon-v">mysql</span> <span class="crayon-o">-</span><span class="crayon-e">uroot</span></div>
<div id="crayon-58ca97e348506966592378-6" class="crayon-line crayon-striped-line"><span class="crayon-st">use</span> <span class="crayon-v">mysql</span><span class="crayon-sy">;</span></div>
<div id="crayon-58ca97e348506966592378-7" class="crayon-line"><span class="crayon-e">update </span><span class="crayon-e">user </span><span class="crayon-e">set </span><span class="crayon-v">authentication_string</span><span class="crayon-o">=</span><span class="crayon-e">PASSWORD</span><span class="crayon-sy">(</span><span class="crayon-s">"NEW_PASSWORD_GOES_HERE"</span><span class="crayon-sy">)</span> <span class="crayon-e">where </span><span class="crayon-v">User</span><span class="crayon-o">=</span><span class="crayon-s">'root'</span><span class="crayon-sy">;</span></div>
<div id="crayon-58ca97e348506966592378-8" class="crayon-line crayon-striped-line"><span class="crayon-e">flush </span><span class="crayon-v">privileges</span><span class="crayon-sy">;</span></div>
<div id="crayon-58ca97e348506966592378-9" class="crayon-line"><span class="crayon-v">quit</span><span class="crayon-sy">;</span></div>
<div id="crayon-58ca97e348506966592378-10" class="crayon-line crayon-striped-line"><span class="crayon-v">sudo</span> <span class="crayon-o">/</span><span class="crayon-v">etc</span><span class="crayon-o">/</span><span class="crayon-v">init</span><span class="crayon-sy">.</span><span class="crayon-v">d</span><span class="crayon-o">/</span><span class="crayon-e">mysql </span><span class="crayon-e">stop</span></div>
<div id="crayon-58ca97e348506966592378-11" class="crayon-line"><span class="crayon-v">sudo</span> <span class="crayon-o">/</span><span class="crayon-v">etc</span><span class="crayon-o">/</span><span class="crayon-v">init</span><span class="crayon-sy">.</span><span class="crayon-v">d</span><span class="crayon-o">/</span><span class="crayon-e">mysql </span><span class="crayon-v">start</span></div>
</div>

Leave a Reply