snipt

Ctrl+h for KB shortcuts

MySQL

create mysql replication user for both master and slave

GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO repl@'localhost' IDENTIFIED BY 'p4ss';
https://snipt.net/embed/d181cb63f424bb366a902b86674735e1/
/raw/d181cb63f424bb366a902b86674735e1/
d181cb63f424bb366a902b86674735e1
mysql
MySQL
1
2019-05-12T23:39:51
True
False
False
/api/public/snipt/1364/
create-mysql-replication-user-for-both-master-and-slave
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</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="n">REPLICATION</span> <span class="n">SLAVE</span><span class="p">,</span> <span class="n">REPLICATION</span> <span class="n">CLIENT</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="n">repl</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span> <span class="n">IDENTIFIED</span> <span class="k">BY</span> <span class="s1">&#39;p4ss&#39;</span><span class="p">;</span> </span></pre></div> </td></tr></table>
mysql, replication