Python MySQL.connect() question

Jim Conger jimc at regnoc.com
Fri Feb 4 11:26:33 EST 2000


(Answering my own question:  It turns out that this error message is
missleading.  mySQL is actually connecting, but then refusing to attach to
any database due to the mySQL security table settings.  I'm hopefull that
I can find some settings in mySQL that allow python to connect.  If anyone
has been through this before, let me know.

Jim C.)

Jim Conger wrote:

> I have mySQL running on a RH Linux 6.1 box, and have added the
> MySQLmodule.so to my python library.  I can't figure out how to connect
> within python.  My attempts look like:
>
> >>> import MySQL;
> >>> db = MySQL.connect();
> Traceback (innermost last):
>   File "<stdin>", line 1, in ?
> MySQL.error: Can't connect to local MySQL server
> >>>
>
> I know the mySQL server is running in the background during this test,
> so I'm noplussed.  Any examples of working code would be appreciated.
>
> Jim C.

--
Jim Conger
Project Manager
Silicon Valley Oil Co.
jimc at regnoc.com, 925-842-6729






More information about the Python-list mailing list