snipt

Ctrl+h for KB shortcuts

MySQL

mysql add new user

GRANT ALL PRIVILEGES ON *.* TO 'user_name'@'localhost'
IDENTIFIED BY 'password' WITH GRANT OPTION;
https://snipt.net/embed/53f476428018303e2f9e0a20734d7542/
/raw/53f476428018303e2f9e0a20734d7542/
53f476428018303e2f9e0a20734d7542
mysql
MySQL
2
2019-08-23T11:19:34
True
False
False
/api/public/snipt/37443/
mysql-add-new-user
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">GRANT</span> <span class="k">ALL</span> <span class="n">PRIVILEGES</span> <span class="k">ON</span> <span class="o">*</span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">&#39;user_name&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span> </span><span id="L-2"><a name="L-2"></a><span class="n">IDENTIFIED</span> <span class="k">BY</span> <span class="s1">&#39;password&#39;</span> <span class="k">WITH</span> <span class="k">GRANT</span> <span class="k">OPTION</span><span class="p">;</span> </span></pre></div> </td></tr></table>
"new user", bash, mysql