There have been similar questions on StackOverflow about this, but I haven't found quite the same situation. This is on a OS X Leopard machine using MySQL
Some starting information:
MySQL Server version 5.1.30
Apache/2.2.13 (Unix)
Python 2.5.1
mod_wsgi 3
mysqladmin also has skip-networking listed as OFF
I am able to connect to mysql from the python command line. But when I try to do it through mod_wsgi using code that is copy and pasted or via Django I receive the generic connection refusal
OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (49)")
I've looked at the mysql manual and tried its troubleshooting tips such as
telnet localhost 3306
and I do get a connection.
I am not trying to connect as root, either.
Any ideas on what else I could check? Thanks in advance!