title: how to pass password in mysql command line
body: <p>I've a password with special characters in it, something like this <code>eu8y~!~LZVdzW!2A</code>.</p>
  
  <p>Whenever, I try to fire the mysqldump command, it throws an error saying </p>
  
  <pre><code>mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
  </code></pre>
  
  <p>this is how I do it.</p>
  
  <pre><code>mysqldump -uroot -p'eu8y~!~LZVdzW!2A' db_name &gt; db.sql
  </code></pre>
  
  <p>however, if provide the password separately, it works.</p>
  
  <pre><code>mysqldump -uroot -p db_name &gt; db.sql
  </code></pre>
  
  <p>I run the above command in python. How can I do it?</p>