title: Setting Django/MySQL site to use UTF-8
body: <p>I want to set my Django site to use UTF-8 for MySQL in a foolproof way, regardless of whether the MySQL installation uses UTF-8 as its default.   In addition to creating the tables with UTF-8 encoding, I added the following to my database initialization in settings.py to ensure the connection is also using utf-8:</p>
  
  <pre><code>'OPTIONS': { 'init_command': 'SET storage_engine=INNODB; SET names "utf8"' }
  </code></pre>
  
  <p>This results in an error:</p>
  
  <pre><code>_mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now")
  </code></pre>
  
  <p>What is the right way to do this? Is there another place where the SET NAMES needs to be executed?</p>