title: Connecting to MySQL database in django using workbench
body: <p>I've got a django project connected to a MySQL database as follows:</p>
  
  <p>settings.py</p>
  
  <pre><code>DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.mysql',
          'NAME': 'my_db',
          'USER': 'username',
          'PASSWORD': 'mypassword',
          'HOST': '',
          'PORT': '',
      }
  }
  </code></pre>
  
  <p>on running <code>python manage.py syncdb</code>, it creates the database and on <code>runserver</code> the application runs perfectly and I'm able to input data into the models using the admin panel correctly.</p>
  
  <p>However, on trying to connect to the database using MySQL Workbench, it gives me
  <code>Can't connect to MySQL server on '127.0.0.1' (111)</code> error.</p>
  
  <p>I had created the database as follows:</p>
  
  <pre><code>Grant all on my_db.* to 'username'@'localhost' identified by 'mypassword';
  flush privileges;
  </code></pre>
  
  <p>Why would Workbench show me that error even though the server is running correctly? Thanks in advance!</p>
  
  <p>Edit: Used the word pythong. </p>