OperationalError: Can't connect to local MySQL server through socket
<p>I'm trying to run a server in python/django and I'm getting the following error:</p>

<blockquote>
  <p>django.db.uils.OperationslError: (200, "Can't connect to local MySQL
  server through socket '/tmp/mysql.sock' (2)").</p>
</blockquote>

<p>I have <code>MySQL-python</code> installed (1.2.5 version) and mysql installed (0.0.1), both via pip, so I'm not sure why I can't connect to the MySQL server. Does anyone know why? Thanks!</p>

<p>You can't install mysql through pip; it's a database, not a Python library (and it's currently in version 5.7). You need to install the binary package for your operating system.</p>

python mysql django