[egenix-users] problem connecting to mysql

M.-A. Lemburg mal at lemburg.com
Wed Oct 29 11:31:24 CET 2003


F.Baart at SFK.NL wrote:
> Dear somebody,
> 
> I'm having some problems connecting a windows zope machine to our linux
> mysql machine.
> 
> I did the following:
> 
> I've added a new user  to mysql.
> I've added a mysql connection to odbc in the windows configuration panel
> (without specifying the username and password).
> I've added a egenix mxODBC database connection in Zope.
> I specified the connection string as
> "DSN=mysql_odbc_connection;UID=user;PWD=password"
> 
> When I open the connection it seems like the uid and pwd aren't supplied to
> mysql. I get an error that reads:
> 
> """
> Connection string: DSN=mysql_odbc_connection;
> UID=user;
> PWD=password
> 
> 
> Connection pool entry: 0
> 
> Error message: ('HY000', 1045, "[MySQL][ODBC 3.51 Driver]Access deni
> ed for user: 'ODBC at zopeserver' (Using password: NO)", 7935)
> """

Try putting the connection string on one line, ie.

DSN=mysql_odbc_connection;UID=user;PWD=password

Some ODBC drivers are very picky about line breaks in the DSN
and MySQL's seems to be one of them.

> When I use the ZODBC connection and supply "mysql_odbc_connection user
> password" it works nicely.
> Also when I add the username and password to the mysql connection it works.
> But I'd rather supply the username and password in the connection string.
> I hope somebody can help me to use the egenix odbc connection to mysql.
> 
> Thanks,
> 
> Fedor Baart
> SFK
> 
> 
> 
> 
> _______________________________________________________________________
> eGenix.com User Mailing List                     http://www.egenix.com/
> http://lists.egenix.com/mailman/listinfo/egenix-users

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Software directly from the Source  (#1, Oct 29 2003)
 >>> Python/Zope Products & Consulting ...         http://www.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the egenix-users mailing list