snipt

Ctrl+h for KB shortcuts

Bash

backup all databases mysql

mysqldump --opt --extended-insert --single-transaction --create-options --default-character-set=utf8 --all-databases --user=<user> --password=<password> > all.sql
https://snipt.net/embed/2b620a12190a51ef2778c379b44721d1/
/raw/2b620a12190a51ef2778c379b44721d1/
2b620a12190a51ef2778c379b44721d1
bash
Bash
1
2019-05-24T16:49:16
True
False
False
/api/public/snipt/4914/
backup-all-databases-mysql
<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>mysqldump --opt --extended-insert --single-transaction --create-options --default-character-set<span class="o">=</span>utf8 --all-databases --user<span class="o">=</span>&lt;user&gt; --password<span class="o">=</span>&lt;password&gt; &gt; all.sql </span></pre></div> </td></tr></table>
backup, mysql, sysadmin