[erlang-questions] MacOSX 10.5, odbc, MySQL

Justin Pearson <>
Tue Mar 17 10:17:48 CET 2009


I am trying to use odbc to connect to a mysql database on Mac OSX
10.5.

Here is what I did:
 1) Installed the latest version of mysql community edition and  
 2) mysql odbc drivers. These I installed from the binary packages on 
    mysql webpage.

 3) I compiled erlang from source I ran ./configure --with-odbc 
    before I compiled it.

I've set up mysql added the users that I need. According to Mac OS's
odbc browser I have a service myodbc which I can connect to using open
office so it is alve. 

But when I try to use erlang I get the following:


Eshell V5.6.5  (abort with ^G)
1> odbc:start().
ok
2> odbc:connect("DSN=myodbc;UID=justin;PWD=xxxxxx",[]).

=ERROR REPORT==== 17-Mar-2009::10:09:02 ===
ODBC: received unexpected info: {tcp_closed,#Port<0.528>}


=ERROR REPORT==== 17-Mar-2009::10:09:02 ===
** Generic server <0.37.0> terminating 
** Last message in was {#Port<0.526>,{exit_status,138}}
** When Server state == {state,#Port<0.526>,
                               {<0.30.0>,#Ref<0.0.0.39>},
                               <0.30.0>,undefined,on,undefined,undefined,on,
                               connecting,undefined,0,
                               [#Port<0.524>,#Port<0.525>],
                               #Port<0.527>,#Port<0.528>}
** Reason for termination == 
** {port_exit,killed}
{error,connection_closed}
3> 




I also get the same if I try 
 odbc:connect("some_random_string",[]).

So I suspect that I'm missing something fundamental?


Thanks

Justin Pearson



More information about the erlang-questions mailing list