title: MySQLDump Backup of UTF-8 Database Has Character Corruption, But Default Charsets are Correct
body: <p>When I'm trying to make a full dump of the database as follows:  </p>
  
  <p><code>mysql --default-character-set=utf8 -uUSER -p database -r output.sql</code></p>
  
  <p>It creates a UTF-8 file but all international data (Chineese,Spanish,Russian) is corrupted as follows(it's Russian part of the dump):</p>
  
  <p><code>(1,'Ð&lt;9e&gt; Ð½Ð°Ñ&lt;81&gt;')</code></p>
  
  <p>However, when I try to dump one table, it works fine: 
  <code>mysql --default-character-set=utf8 -uUSER -p database table_name -r output.sql</code></p>
  
  <p>I don't quite understand what causes the issue as all possible variables are set to UTF-8:</p>
  
  <pre><code>show variables like "collation_database";
  +--------------------+-----------------+
  | Variable_name      | Value           |
  +--------------------+-----------------+
  | collation_database | utf8_general_ci | 
  +--------------------+-----------------+
  
  show variables like "character_set_database";
  +------------------------+-------+
  | Variable_name          | Value |
  +------------------------+-------+
  | character_set_database | utf8  | 
  +------------------------+-------+
  </code></pre>
  
  <p>All tables also have the same charset/collation.
  There are the following settings in my.cnf</p>
  
  <pre><code>[client]
  default-character-set=utf8
  
  [mysql]
  default-character-set=utf8
  
  [mysqld]
  collation-server = utf8_general_ci
  init-connect='SET NAMES utf8'
  character-set-server = utf8
  </code></pre>
  
  <p>And finally, locale is set to utf-8 as well.
  So what could be the problem of the issue? I'm pretty sure it's a dumb issue but I'm out of the ideas. I would appreciate the assistance greatly.</p>