有类似问题,贴上来看看对你有否帮助:
[function.mysql-connect]: Can't create TCP/IP socket (10106)
Trying to connect to mysql with PHP under windows XP pro. 
The solution to this problem was for me to connect 
.via named pipe (FIFO)
in the my.ini, I added this:
enable-named-pipe
and renamed localhost:
HOST=.
(just a dot) and not 
HOST=localhost 
which, if I anderstand well try to find its way via TCP/IP and for some reason doesn't. 
I overlooked the installation manual.
Everything works just fine now.

解决方案 »

  1.   

    mysql4.1.7是一个稳定的版本,有没有可能是connection没有关或驱动版本问题之类的。
    up
      

  2.   

    按照trampwind(随风) 搞定了
    我在配置myodbc时在servername选项中填了点(.)在my.ini中添加了enable-named-pipe
    然后重启动了服务,就再也没有出现连不上的现象。
    谢谢!