mxODBC and MySQL access to remote DB

Joachim Schmitz perry at ac-copy.net
Sun Jul 4 14:31:39 EDT 1999


Hello,

I´m trying to connect from a linux-box with mxODBC to a MySQL db on a
remote SUN. I can access the db with mysql-client from linux. I can also
connect with the odbctool from the iodbc-mysql package.

When I try it with mxODBC.iODBC, which uses the same "iodbc.ini" I always
get this:

line: 38
-- in file: Form.py; function: __init__; line: 40
arg #0 = DSN=immobilien;UID=perry;PWD=pwpwpwpw
Traceback (innermost last):
  File "immoform.py", line 153, in ?
    ,DBtype="MySQL")
  File "Form.py", line 45, in __init__
    ,"pw="+self.pw)^M
mxODBC.OperationalError: ('S1000', 1045, "[TCX][MyODBC]Access denied for
user: 'user=perry at localhost' (Using password: YES)", 4237) 

The iodbc.ini entry looks like this:

[immobilien]
Trace    = Off
TraceFile= stderr
Driver   = /usr/lib/mysql/libmyodbc_mysql.so
DSN      = immobilien
SERVER   = test.ac-copy.net
UID      =
PWD      =
PORT     = 3306
#OPTION  = 1
#DB      = test
#SOCKET  = /tmp/mysql.sock
 
with:

odbctool -u perry -p pwpwpwpw -d immobilien "show tables"
<table border=1>
<th>Tables in immobilien</th>
<tr>
<td>IMMOAUFTRAG</td>
</tr>
<tr>
<td>IMMOKUNDE</td>
</tr>
</table>                           

Any help is welcome.



Gruß

Joachim Schmitz

WWW-Consultant

email: js at ac-copy.net
tel: +49-241-89491-0
fax: +49-241-89491-29






More information about the Python-list mailing list