A program I wrote using python and MySQL ran much, much slower on my development computer than on the client’s computer. And their computer seemed about the same spec as mine. I upgraded from python 2.4 to 2.5. Nope. Was it the RAM. Nope – they had half a Gb to my 1Gb. Was it the hard drive? The L1 and L2 cache? Who could tell.
A friend (a very good friend) suggested it might be a MySQL setting. I was looking around in there when I noticed the named pipe alternative to the TCP/IP protocol. TCP/IP. Hmmmm I had sort of noticed the wireless network icon flickering in the taskbar when running MySQL. Could it be ….. ContentProtect!?
I reconfigured MySQL to not use TCP/IP:
connMySQL = MySQLdb.connect(host=maint.DB_HOST, user=maint.DB_USER,
… and the program suddenly flew! I could barely keep up with the screen output. Unfortunately my favourite MySQL manager, SQLyog, did not support named pipes.
But if I switched on support for TCP/IP the code relying on named pipes stopped working. I would get “error 2017: can’t open named pipe to host”.
The answer was to manually add one line to my my.ini file – namely:
Now I could use the named pipes where possible, thus sidestepping the numbing effect of ContentProtect, while still being able to use tools that required or expected TCP/IP.
A useful reference is on: