title: Access XAMPP by default via MySQLdb Python lib on Ubuntu 10.10
body: <p>I'm attempting to build a Virtual Machine to develop a Django application. The OS is Ubuntu 10.10. I have most everything installed. The last piece is getting MySQLdb to work with the MySQL instance that comes with XAMPP. </p>
  
  <p>How can I get MySQLdb to default to work with the XAMPP MySQL?</p>
  
  <p>I found this: <a href="https://stackoverflow.com/questions/3300716/accessing-a-xampp-mysql-via-python">Accessing a XAMPP mysql via Python</a></p>
  
  <p>I understand the problem there, but the solution doesn't work for me because Django handles creating connections behind the scenes. I also don't want to be manipulating Django for some an application. </p>
  
  <p>I've attempted to modify the My.cnf in two different ways but it doesn't work. I'm still getting the same error. That error is listed here: </p>
  
  <pre><code>Traceback (most recent call last):
    File "test-mysqldb.py", line 4, in &lt;module&gt;
      db = MySQLdb.connect( user="root", passwd="", db="faceless001" )
    File "/usr/lib/pymodules/python2.6/MySQLdb/__init__.py", line 81, in Connect
      return Connection(*args, **kwargs)
    File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 170, in __init__
      super(Connection, self).__init__(*args, **kwargs2)
  _mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
  </code></pre>
  
  <p>XAMPP installed itself to: <code>/opt/lampp/</code> </p>
  
  <p>I'm looking for the simplest, <em>correct</em> solution for this. Any background info you can share would be helpful, also.</p>