[racket] Got some trouble the the mysql-connect

From: Ryan Culpepper (ryan at cs.utah.edu)
Date: Fri Nov 18 14:30:32 EST 2011

On 11/18/2011 12:23 AM, MingQian Zhang wrote:
> Hi all:
>
> I got some errors when using new (require db) module.
> Here are the two errors:
> 1. io:read-null-terminated-bytes: internal error: communication problem
> (unexpected EOF)
> 2. parse-packet: internal error: communication problem (expected
> authentication ok packet)
>
> The whole thing is like this:
> 1. write my code like this:
> (require db)
> (define sql-exp
> (mysql-connect #:server "my sql server ip"
> #:port 3306
> #:database "name"
> #:user "user"
> #:password "password"))
>
> 2. when I run this code , I met my problems:
> I have two mysql servers to connect, they are in different ips.
>
> when use the code to connect 1 , I got Error 1:
> io:read-null-terminated-bytes: internal error: communication problem
> (unexpected EOF)
>
> Then I tried to connect server 2, I got another error:
> parse-packet: internal error: communication problem (expected
> authentication ok packet)
>
> 3. other tries
> After got the errors, I tried to connect a localhost server,
> Like this :
> (define test
> (mysql-connect #:server "localhost"
> #:port 3306
> #:database "test"
> #:user "root"))
>
> It's OK and no error happens.
>
> Then I tried this in a virtual machine like this
> (define test
> (mysql-connect #:server "10.0.2.2"
> #:port 3306
> #:database "test"
> #:user "root"))
> It's OK , too.
>
> Also I tried postgresql, it's OK , too.
>
> Can you help me to figure out what's wrong when connecting my mysql server ?
> Thanks very much!

I'll look into this. What version of MySQL is each of the servers 
running? In particular, does it succeed with one version and fail with 
another? And are any of the servers configured to reject non-SSL 
connections?

Ryan


Posted on the users mailing list.