 <p>I created the following one line solution avoiding multiple grep commands. </p> <pre><code>mysql -e "show databases;" | grep -Ev "Database|DatabaseToExclude1|DatabaseToExclude2" | xargs mysqldump --databases &gt;mysql_dump_filename.sql </code></pre> <p>The -E in grep enables extended regex support which allowed to provide different matches separated by the pipe symbol "|". More options can be added to the mysqldump command. But only before the "--databases" parameter.</p> <p>Little side note, i like to define the filename for the dump like this ... </p> <pre><code>... &gt;mysql_dump_$(hostname)_$(date +%Y-%m-%d_%H-%M).sql </code></pre> <p>This will automatically ad the host name, date and time to the filename. :)</p>