title: KeyError: <type="str> while making migration in Django
body: <p>I created a model and Tried to migrate it, it is throwing error.</p>
  
  <pre><code>from __future__ import unicode_literals
  from django.utils import timezone
  from django.db import models
  
  # Create your models here.
  class Post(models.Model):
      title = models.CharField(max_length = 200)
      body = models.TextField()
      created_at = models.DateTimeField(default=timezone.now, blank = True)
  </code></pre>
  
  <p>This is the error I am getting after creating the Model.
  I am using mysql instead of sqlite3. </p>
  
  <pre><code>Traceback (most recent call last):
    File "manage.py", line 22, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
      utility.execute()
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 356, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 283, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 330, in execute
      output = self.handle(*args, **options)
    File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/makemigrations.py", line 110, in handle
      loader.check_consistent_history(connection)
    File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 283, in check_consistent_history
      applied = recorder.applied_migrations()
    File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/recorder.py", line 65, in applied_migrations
      self.ensure_schema()
    File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/recorder.py", line 52, in ensure_schema
      if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
    File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 254, in cursor
      return self._cursor()
    File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 229, in _cursor
      self.ensure_connection()
    File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 213, in ensure_connection
      self.connect()
    File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 189, in connect
      self.connection = self.get_new_connection(conn_params)
    File "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 276, in get_new_connection
      conn.encoders[SafeBytes] = conn.encoders[bytes]
  KeyError: &lt;type 'str'&gt;
  </code></pre>
  
  <p>EDIT:
  Database setting
  Using XAMPP mysql database -> localhost/phpmyadmin
  In that I created djangoproject db</p>
  
  <pre><code>DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.mysql',
          'NAME': 'djangoproject',
          'USER': 'root',
          'PASSWORD': '',
          'HOST': '127.0.0.1',
      }
  }
  </code></pre>