snipt

Ctrl+h for KB shortcuts

MySQL

Take mysql backup and import (overwrite) existing database

source /path/to/file/file.sql;
https://snipt.net/embed/26d5737b8cd5a8235c7288ea4c68d8b7/
/raw/26d5737b8cd5a8235c7288ea4c68d8b7/
26d5737b8cd5a8235c7288ea4c68d8b7
mysql
MySQL
1
2019-06-27T00:48:55
True
False
False
/api/public/snipt/54242/
take-mysql-backup-and-import-overwrite-existing-database
<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="n">source</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="k">to</span><span class="o">/</span><span class="n">file</span><span class="o">/</span><span class="n">file</span><span class="p">.</span><span class="k">sql</span><span class="p">;</span> </span></pre></div> </td></tr></table>
"mysql import", mysql