[Tutor] Python to connect to MySql (original) (raw)

Lloyd Kvam pythonTutor at venix.com
Thu Jul 1 12:28:36 EDT 2004


I am using MySQLdb on Windows and Linux. Works well.

This is a useful set of links. Read the DBI documentation. http://python.org/topics/database/

On Thu, 2004-07-01 at 11:44, Bernard Lebel wrote: > Hello, >> I'm wondering if there is any way to connect to a MySql server (and retreive > information) without the need of an ActiveX object. Right this is what I'm > doing, but again I want to get rid of the active objects. >> I have found few things on the internet, but some are for Unix servers and > require a C compiler and things like that. Nothing as simple and > straigthforward as an active object. >> Any suggestion? > I'm using MySql 4.0.16 >>> Thanks > Bernard >>>> # Current code: > import win32com.client >> # Create database ActiveX object > oDB = win32com.client.Dispatch( "ADODB.Connection" ) >> # Send connection instructions to database > oDB.ConnectionString = 'driver={MySQL}; server=xxx.xxx.x.x; uid=userid; > pwd=password; database=database' >> oDB.open >> _________________________ > Tutor maillist - Tutor at python.org > http://mail.python.org/mailman/listinfo/tutor

Lloyd Kvam Venix Corp. 1 Court Street, Suite 378 Lebanon, NH 03766-1358

voice: 603-653-8139 fax: 801-459-9582



More information about the Tutor mailing list