title: Understanding which database to use as the 'NAME' when connecting to an AWS RDS MySQL database using Django
body: <p>I created a new AWS mysql database instance with RDS, and I'm trying to connect to it from my Django app on my machine. Django requires the default database connection to be formatted like so in <code>settings.py</code>:</p>
  
  <p><code>DATABASES = {
    'default': {
      'ENGINE': 'django.db.backends.mysql',
      'NAME': 'innodb',
      'USER': 'username',
      'PASSWORD': 'password',
      'HOST': '--------.us-west-2.rds.amazonaws.com',
      'PORT': '####'
    }
  }</code></p>
  
  <p>My question concerns the <code>'NAME'</code> parameter. I connected to the AWS instance from my command line using the provided endpoint and port number in the RDS console and checked to see what databases were there. This is a brand new database instance I created with RDS, and there were 5 databases.</p>
  
  <p><code>$ mysql -h ---------.us-west-2.rds.amazonaws.com -P #### -u username -p
  Enter password:</code></p>
  
  <p><code>mysql&gt; show databases;
  +--------------------+
  | Database           |
  +--------------------+
  | information_schema |
  | innodb             |
  | mysql              |
  | performance_schema |
  | sys                |
  +--------------------+</code></p>
  
  <p>The only one of these databases that was empty was the one called <code>innodb</code>. At first I thought the <code>NAME</code> parameter was supposed to be 'mysql', since that is the name of the database server I'm using. But when I used 'mysql' as the name and ran <code>python manage.py migrate</code> I got an error saying </p>
  
  <p><code>django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table ((1044, "Access denied for user 'username' to database 'mysql'"))</code></p>
  
  <p>Changing the <code>NAME</code> to 'innodb' let me connect and write tables with the <code>migrate</code> command. </p>
  
  <p>Why do I need to use the innodb database instead of mysql or any of the others? I didn't see any mention of 5 databases being created when I create a new RDS instance on AWS, and I could not find any mention of what name you are supposed to use when connecting to the RDS instance. What is the purpose of these 5 databases and why is innodb the only one that was empty and writable?</p>