MySQL Forums
Forum List  »  Connector/Python

Re: How to check for mySQL installation?
Posted by: Huu Da Tran
Date: March 14, 2008 05:22PM

>>> try:
...     MySQLdb.connect(u'localhost')
... except MySQLdb.OperationalError, err:
...     if (err.args[0] == 2002):
...         print u"MySQL not running."
... 
MySQL not running.

Options: ReplyQuote


Subject
Written By
Posted
n n
March 14, 2008 09:01AM
Re: How to check for mySQL installation?
March 14, 2008 05:22PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.