MySQLdb "Illegal instruction" error.

Skip Montanaro skip at pobox.com
Sun Dec 23 15:37:56 CET 2001


    >> >>> import MySQLdb
    >> >>> d = MySQLdb.connect("", "test", "", "")
    >> Illegal instruction
    >> 
    >> I can confirm that the MySQL database 'test' can be accessed by
    >> anybody on localhost (as well as any other host) using the mysql
    >> client. So, I think it must be MySQLdb on my system.

    shriek> Sorry, the above snippet was wrong - should've been 

    >>>> d = MySQLdb.connect("", "", "", "test") 

    shriek> but the problem still persists (ie. "Illegal Instruction" error
    shriek> and Python exits).

Works for me (2.2, --with-threads, MySQLdb 0.9.1):

    >>> import MySQLdb
    >>> d = MySQLdb.connect("", "", "", "test")
    >>> c = d.cursor()
    >>> c.execute("describe tables")
    >>> c.execute("show tables")
    1L
    >>> c.fetchall()
    (('testac',),)
    >>> c.execute ("describe testac")
    2L
    >>> c.fetchall()
    (('object_id', 'int(11)', 'YES', '', None, ''),
     ('object_title', 'varchar(64)', 'YES', '', None, ''))

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list