Python MySQL.connect() question

Hafeez Bana hafhat at
Thu Feb 3 00:26:39 CET 2000

I am sorry. I should have explained my reason for saying so. The MySQL
interface uses "localhost" as the default value (when you supply a null
hostname) - and when localhost is used it uses a unix socket. If you
want to use TCP/IP sockets (which is more platform independent but
slower) you need to specify something other then "localhost".

Mysql can be told what kind of communication it uses. In your case Mysql
maybe listening on a unix socket and so localhost works  - this was not
the case with my configuration of Mysql. I hope you get what I am

Further information can be found in the README for the MySQL driver. I
think Jim would be the best person to confirm if it worked - it did for

Boudewijn Rempt wrote:
> Hafeez Bana <hafhat at> wrote:
> > Try using "" instead of localhost.
> Well, that shouldn't make a difference - especially since localhost
> does work on my box. I wonder what the results would be if Jim used
> another MySQL binding, like MySQLdb?
> --
> Boudewijn Rempt  |

More information about the Python-list mailing list