title: Can't connect to localhost using mysql
body: <p>I am new to Django and mysql and I am trying to configure my django application's backend to mysql. I am using XAMPP for my local mysql database and anaconda as my pkg manager. Also using a conda virtualenv. </p>
  
  <p>When I go to run <code>python3 manage.py migrate</code>, I get this error:</p>
  
  <pre><code>django.db.utils.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' (61)")
  </code></pre>
  
  <p>My database is setup as the following:</p>
  
  <pre><code>DATABASES = {
  'default': {
      'ENGINE': 'django.db.backends.mysql',
      'NAME': 'exampleproject',
      'USER': 'root',
      'PASSWORD': '',
      'HOST': '127.0.0.1',
      'PORT': '',
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I changed 'HOST' to 'localhost' but then get this error:</p>
  
  <pre><code>django.db.utils.OperationalError: (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)")
  </code></pre>
  
  <p>Any help is appreciated! </p>