<div><br></div><div><includetail><div>
Thanks, Ryan
!</div></includetail><div><br></div><div>Here are two mysql servers I can't connect:</div><div>1. </div><div>mysql Ver 14.14 Distrib 5.1.58, for debian-linux-gnu (x86_64) using readline 6.2<br>Connection id: 6747<br>Current database:<br>Current user: ***@***<br>SSL: Not in use<br>Current pager: stdout<br>Using outfile: ''<br>Using delimiter: ;<br>Server version: 5.0.77-log Source distribution<br>Protocol version: 10<br>Connection: *** via TCP/IP<br>Server characterset: latin1<br>Db characterset: latin1<br>Client characterset: latin1<br>Conn. characterset: latin1<br>TCP port: 3306<br>2. <br></div><div>mysql Ver 14.14 Distrib 5.1.58, for debian-linux-gnu (x86_64) using readline 6.2<br>Connection id: 332085<br>Current database:<br>Current user: ***@***<br>SSL: Not in use<br>Current pager: stdout<br>Using outfile: ''<br>Using delimiter: ;<br>Server version: 5.5.9-log MySQL Community Server (GPL)<br>Protocol version: 10<br>Connection: *** via TCP/IP<br>Server characterset: latin1<br>Db characterset: latin1<br>Client characterset: latin1<br>Conn. characterset: latin1<br>TCP port: 3306<br></div><div><br></div><includetail><div>And these two servers I can connect correctly:</div></includetail><div>1.</div><div>mysql Ver 14.14 Distrib 5.1.58, for debian-linux-gnu (x86_64) using readline 6.2<br>Connection id: 68<br>Current database:<br>Current user: root@localhost<br>SSL: Not in use<br>Current pager: stdout<br>Using outfile: ''<br>Using delimiter: ;<br>Server version: 5.1.58-1ubuntu1 (Ubuntu)<br>Protocol version: 10<br>Connection: Localhost via UNIX socket<br>Server characterset: latin1<br>Db characterset: latin1<br>Client characterset: latin1<br>Conn. characterset: latin1<br>UNIX socket: /var/run/mysqld/mysqld.sock<br>Uptime: 3 hours 28 min 28 sec<br> </div><div>2. </div><div>mysql Ver 14.14 Distrib 5.1.58, for debian-linux-gnu (x86_64) using readline 6.2<br>Connection id: 12<br>Current database:<br>Current user: ***@***<br>SSL: Not in use<br>Current pager: stdout<br>Using outfile: ''<br>Using delimiter: ;<br>Server version: 5.0.56-log Source distribution<br>Protocol version: 10<br>Connection: *** via TCP/IP<br>Server characterset: latin1<br>Db characterset: latin1<br>Client characterset: latin1<br>Conn. characterset: latin1<br>TCP port: 3306<br></div><div><br></div><includetail><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "Ryan Culpepper"<ryan@cs.utah.edu>;</div><div><b>Date: </b> Sat, Nov 19, 2011 03:30 AM</div><div><b>To: </b> "MingQian Zhang"<zmingqian@qq.com>; </div><div><b>Cc: </b> "users"<users@racket-lang.org>; </div><div><b>Subject: </b> Re: [racket] Got some trouble the the mysql-connect</div></div><div> </div>On 11/18/2011 12:23 AM, MingQian Zhang wrote:<br>> Hi all:<br>><br>> I got some errors when using new (require db) module.<br>> Here are the two errors:<br>> 1. io:read-null-terminated-bytes: internal error: communication problem<br>> (unexpected EOF)<br>> 2. parse-packet: internal error: communication problem (expected<br>> authentication ok packet)<br>><br>> The whole thing is like this:<br>> 1. write my code like this:<br>> (require db)<br>> (define sql-exp<br>> (mysql-connect #:server "my sql server ip"<br>> #:port 3306<br>> #:database "name"<br>> #:user "user"<br>> #:password "password"))<br>><br>> 2. when I run this code , I met my problems:<br>> I have two mysql servers to connect, they are in different ips.<br>><br>> when use the code to connect 1 , I got Error 1:<br>> io:read-null-terminated-bytes: internal error: communication problem<br>> (unexpected EOF)<br>><br>> Then I tried to connect server 2, I got another error:<br>> parse-packet: internal error: communication problem (expected<br>> authentication ok packet)<br>><br>> 3. other tries<br>> After got the errors, I tried to connect a localhost server,<br>> Like this :<br>> (define test<br>> (mysql-connect #:server "localhost"<br>> #:port 3306<br>> #:database "test"<br>> #:user "root"))<br>><br>> It's OK and no error happens.<br>><br>> Then I tried this in a virtual machine like this<br>> (define test<br>> (mysql-connect #:server "10.0.2.2"<br>> #:port 3306<br>> #:database "test"<br>> #:user "root"))<br>> It's OK , too.<br>><br>> Also I tried postgresql, it's OK , too.<br>><br>> Can you help me to figure out what's wrong when connecting my mysql server ?<br>> Thanks very much!<br><br>I'll look into this. What version of MySQL is each of the servers <br>running? In particular, does it succeed with one version and fail with <br>another? And are any of the servers configured to reject non-SSL <br>connections?<br><br>Ryan<br></div></includetail></div>