title: Cannot connect MySQL database from django
body: <p>I am trying to connect my MySql server from Django application , but whenever I am running the command python manage.py runserver it showing the error:</p>
  
  <pre><code> File "/usr/local/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-linux-i686.egg/MySQLdb/connections.py", line 187, in __init__
   _mysql_exceptions.OperationalError: (1045, "Access denied for user 'user'@'localhost' (using password: NO)")
  </code></pre>
  
  <p>But my settings.py connection string is like :</p>
  
  <pre><code>DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
          'NAME': 'django_personnel',       # Or path to database file if using sqlite3.
          'USER': 'root',                   # Not used with sqlite3.
          'PASSWORD': 'personnel',          # Not used with sqlite3.
          'HOST': '127.0.0.1', # Set to empty string for localhost. Not used with sqlite3.
          'PORT': '3306',        # Set to empty string for default. Not used with sqlite3.
      }
  } 
  </code></pre>
  
  <p>But I can easily connect the database from mysql shell :</p>
  
  <pre><code> mysql -u root -ppersonnel django_personnel
  </code></pre>
  
  <p>Please guide me. Thanks in advance.</p>