Django not creating tables " Table django_session does not exist"
<p>Whenever I run <code>python manage.py migrate</code> I cannot get the required tables. The only tables that I get are <code>django_content_type</code> and <code>django_migrations</code>. Because of this I cannot log into the admin page or create a super user. I am using <code>MySQL-connector-python-rf</code>, python 3.4 and Django 1.9.8 I have followed instructions of deleting the tables to creating a new database and the problem still persist. </p>

<p>This is my database and apps setup in <code>settings.py</code></p>

<pre><code># Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    'usermie',
]

MIDDLEWARE_CLASSES = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

DATABASES = {
    'default': {
        'ENGINE': 'mysql.connector.django',
        'NAME': 'testerdb',
        'USER': 'root',
        'PASSWORD': '',
    }
}
</code></pre>

<p>I was using django before and working on a project on this same computer, but now I do not know what has happened and why I am not getting the tables.</p>

<p>Below is what I get when I run <code>python manage.py migrate</code></p>

<pre><code>(mie) C:\Users\dane_\DjangoProjects\pagemie&gt;python manage.py makemigrations
Migrations for 'usermie':
  0001_initial.py:
    - Create model Usermie

(mie) C:\Users\dane_\DjangoProjects\pagemie&gt;python manage.py migrate
Operations to perform:                                                                                                    
Apply all migrations: contenttypes, auth, sessions, admin, usermie                                                    
Running migrations:                                                                                                       
Rendering model states... DONE
  Applying contenttypes.0001_initial...Traceback (most recent call last):                                                 
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\mysql_connector_python_rf-2.1.3-py3.4-win-amd64.egg\mysql\connector\django\base.py", line 177, in _execute_wrapper                                                                 
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\mysql_connector_python_rf-2.1.3-py3.4-win-amd64.egg\mysql\connector\cursor.py", line 515, in execute                                                                               
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\mysql_connector_python_rf-2.1.3-py3.4-win-amd64.egg\mysql\connector\connection.py", line 488, in cmd_query                                                                         
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\mysql_connector_python_rf-2.1.3-py3.4-win-amd64.egg\mysql\connector\connection.py", line 395, in _handle_result
mysql.connector.errors.ProgrammingError: 1050 (42S01): Table 'django_content_type' already exists
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 10, in &lt;module&gt;
    execute_from_command_line(sys.argv)                                                                                   
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\core\management\__init__.py", line 353, in execute_from_command_line
    utility.execute()                                                                                                     
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\core\management\__init__.py", line 345, in execute                                                                                                                            
self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\core\management\base.py", line 348, in run_from_argv                                                                                                                          
self.execute(*args, **cmd_options)
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\core\management\base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\core\management\commands\migrate.py", line 200, in handle                                                                                                                     
executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\db\migrations\executor.py", line 92, in migrate       
self._migrate_all_forwards(plan, full_plan, fake=fake, fake_initial=fake_initial)                                     
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\db\migrations\executor.py", line 121, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)                                  
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\db\migrations\executor.py", line 198, in apply_migration
    state = migration.apply(state, schema_editor)
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\db\migrations\migration.py", line 123, in apply       
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\db\migrations\operations\models.py", line 59, in database_forwards
    schema_editor.create_model(model)
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\db\backends\base\schema.py", line 284, in create_model
    self.execute(sql, params or None)
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\db\backends\base\schema.py", line 110, in execute
    cursor.execute(sql, params)                                                                                           
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\db\backends\utils.py", line 79, in execute            
return super(CursorDebugWrapper, self).execute(sql, params)
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\db\backends\utils.py", line 62, in execute
    return self.cursor.execute(sql)                                                                                       
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\mysql_connector_python_rf-2.1.3-py3.4-win-amd64.egg\mysql\connector\django\base.py", line 227, in execute
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\mysql_connector_python_rf-2.1.3-py3.4-win-amd64.egg\mysql\connector\django\base.py", line 180, in _execute_wrapper
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\django\utils\six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\mysql_connector_python_rf-2.1.3-py3.4-win-amd64.egg\mysql\connector\django\base.py", line 177, in _execute_wrapper                                                                 
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\mysql_connector_python_rf-2.1.3-py3.4-win-amd64.egg\mysql\connector\cursor.py", line 515, in execute                                                                               
File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\mysql_connector_python_rf-2.1.3-py3.4-win-amd64.egg\mysql\connector\connection.py", line 488, in cmd_query
  File "C:\Users\dane_\DjangoVirtualEnvs\mie\lib\site-packages\mysql_connector_python_rf-2.1.3-py3.4-win-amd64.egg\mysql\connector\connection.py", line 395, in _handle_result                                                                  
django.db.utils.ProgrammingError: Table 'django_content_type' already exists               
</code></pre>