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

Y

Yong Wang

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
 
L

Larry Bates

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.

HTH,
Larry Bates
Syscon, Inc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top