I'm running into the same problem. It happens when I installed php4 on my machine. When I start apache with php5 (configured before I added php4) it worked fine. But as soon as I use the new php4 module mod_python or mysql stops working. MysqlDB is working great from python. But not from within apache
I tried recompiling mod_python, but had no effect. I configured php with --with-mysql --with-apxs=... --with-gd --with-zlib-dir --with-curl --with-config-file-path=/etc
Anyone?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Solved the problem. Problem was in the --with-mysql part of the ./configure. It then configures a native mysql lib from php which is causing the problem. Configuring it with --with-mysql=/usr (base dir of mysql) soved this problem
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not familiar with the error message you've received, but the text does suggest that there is a problem with the server rather than the client libraries. I suggested you use the command line to verify that the server (and you account and password) works. You can instead use some other tool, like one of the MySQL administration tools.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Mod_python error: "PythonHandler mod_python.publisher"
Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py", line 193, in Dispatch
result = object(req)
File "/usr/local/lib/python2.4/site-packages/mod_python/publisher.py", line 173, in handler
result = apply(object, (), args)
File "/usr/local/apache/htdocs/python/my.py", line 5, in mysql
db=MySQLdb.connect(host='localhost',user='*',passwd='*')
File "/usr/local/lib/python2.4/site-packages/MySQLdb/init.py", line 66, in Connect
return Connection(args, *kwargs)
File "/usr/local/lib/python2.4/site-packages/MySQLdb/connections.py", line 134, in init
super(Connection, self).init(args, *kwargs2)
InternalError: (-1, 'server not initialized')
THis displayed then I try to execute cursor.Why????
Is your MySQLdb linked against the embedded server libraries (libmysqld)?
I'm running into the same problem. It happens when I installed php4 on my machine. When I start apache with php5 (configured before I added php4) it worked fine. But as soon as I use the new php4 module mod_python or mysql stops working. MysqlDB is working great from python. But not from within apache
I tried recompiling mod_python, but had no effect. I configured php with --with-mysql --with-apxs=... --with-gd --with-zlib-dir --with-curl --with-config-file-path=/etc
Anyone?
Solved the problem. Problem was in the --with-mysql part of the ./configure. It then configures a native mysql lib from php which is causing the problem. Configuring it with --with-mysql=/usr (base dir of mysql) soved this problem
Can you connect to your MySQL server using the command line client?
Unfortunately I dont have an access to the server's command line:(
I'm not familiar with the error message you've received, but the text does suggest that there is a problem with the server rather than the client libraries. I suggested you use the command line to verify that the server (and you account and password) works. You can instead use some other tool, like one of the MySQL administration tools.
Connection over MySQL client command line works.
it connects in python interpreter. How i can test linkage?