Compiled C++ and Mysql codes run in python cgi script

Larry Bates lbates at
Thu Aug 5 00:25:16 CEST 2004

mysql.sock is a normally a symbolic static link
(normally located in /tmp directory) that is used
to communicate with MySQL.  I suspect that when
you run under web interface, you don't have proper
access rights to that directory for the program
to communicate via this socket interface.

Larry Bates
Syscon, Inc.

"Yong Wang" <yong at> wrote in message
news:mailman.1151.1091647807.5135.python-list at
> Hi, All:
>      We have a network management system written in C++, MysQL, and Hp
> SNMP. It works in Solaris command line. When I wrote a similar
> python codes which call compiled C++ and mysql  codes in solaris
> command line, the comipled codes work fine in wraped python file. When
> I change the python codes to web interface in python CGI script, I got
> message
> that "Can't connect to local MySQL server through socket
> '/tmp/mysql.sock'"
> How can I fix this problem because we want to migrate solaris command
> line system to web access system ? The easiest way for me is directly
> to call
> compiled C++  and mysql codes (excutable) in python CGI scripts, then
> post the run
> results in website.
>    Thank you very much in advance and I am looking forward to your
> reply.
>                   Yong

More information about the Python-list mailing list