wangboo/erlang-mysql-driver

Can't connect to MySQL5.045

Opened this issue · 2 comments

 mysql:start_link(pl,"localhost","root","12345",true).
mysql_conn:620: greeting version "5.0.45-3ubuntu1" (protocol 10) salt
"o3Noe,Ik" caps 41516 serverchar <<8,2,0,0,

                              0,0,0,0,

                              0,0,0,0,

                              0,0,0,0>>salt2 "_zi~_>Y'QC<A"
mysql_auth:187: mysql_auth send packet 1: <<...>>

=ERROR REPORT==== 24-Mar-2008::22:32:06 ===
Error in process <0.53.0> with exit value:
{badarg,[{erlang,iolist_to_binary,[true]},{mysql_conn,init,9}]}

mysql:502: failed starting first MySQL connection handler, exiting
** exited: {error,"timed out"} **
5> 

Original issue reported on code.google.com by wenew...@gmail.com on 24 Mar 2008 at 2:35

I had a similar error trying to make the test application work.

So I compiled each of the files in the src folder separately at the ERL shell 
and
then copied the beam files into the test folder and then ran the example. It 
worked then.

Original comment by jason.bo...@gmail.com on 12 Jun 2009 at 1:58

Hi,
I tried the same way as Jason has done but somehow the code at 
"http://yarivsblog.com/articles/2006/09/13/erlang-mysql-driver-reloaded/" does 
not 
work  for me in few cases:

1. If I put this code in .erl file, I get this
./db01.erl:4: syntax error before: ':'
error

The cause of this I really dont understand.

2. If I use Erlang Shell, things work.

I would like to use .erl to do these things. Can anyone share snippet/ or guide 
me.
The code is exactly the same as that at Yariv's blog, without comments

Thanks,
Atul

Original comment by atu...@gmail.com on 2 Jul 2009 at 8:26