Menu

InternalError: (-1, 'server not initialized')

Help
Crudetis
2005-05-28
2012-09-19
  • Crudetis

    Crudetis - 2005-05-28

    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????

     
    • Andy Dustman

      Andy Dustman - 2005-05-30

      Is your MySQLdb linked against the embedded server libraries (libmysqld)?

       
    • Johan C. Stöver

      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?

       
    • Johan C. Stöver

      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

       
    • Oliver Bock

      Oliver Bock - 2005-05-29

      Can you connect to your MySQL server using the command line client?

       
    • Crudetis

      Crudetis - 2005-05-29

      Unfortunately I dont have an access to the server's command line:(

       
      • Oliver Bock

        Oliver Bock - 2005-05-29

        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.

         
    • Crudetis

      Crudetis - 2005-05-30

      Connection over MySQL client command line works.

       
    • Crudetis

      Crudetis - 2005-06-02

      it connects in python interpreter. How i can test linkage?

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.