Does any one know of a Synapse example connecting to a mariadb/mysql server?

I am having trouble replying to the servers handshake
i am getting packets out of order response no matter what i try to send back to 
the server after connecting okay

i can see what the traffic is with ngrep

i am using
https://mariadb.com/kb/en/connection/
https://mariadb.com/kb/en/connecting-to-mariadb/
https://mariadb.com/kb/en/protocol-data-types/
with no success

the dev.mysql.com  from oracle seems to be intentionally down now for weeks   
so no help there

program testmariadb;
uses blcksock;
var sock1 : ttcpblocksocket;
    buffer : ansistring = '';
    i : integer;
begin
writeln;
sock1 := ttcpblocksocket.create;
sock1.connect('localhost', '3306');
writeln('sock1.lasterror : ', sock1.lasterror);
if sock1.lasterror <> 0 then
  begin
  writeLn('could not connect to server.');
  halt(1);
  end;
repeat
 buffer := sock1.recvpacket(2000);
 writeln('length(buffer : ', length(buffer));
 writeln(buffer);
 writeln;
until buffer = '';
writeln;
sock1.sendstring('root'#13#10'mysql'#13#10); // !��#08S01Got packets out of 
order    just for example of something sent - using the mariadb documents with 
handshake response info sent back give same server response no matter how i try 
to follow the protocol
repeat
 buffer := sock1.recvpacket(2000);
 writeln('length(buffer : ', length(buffer));
 writeln(buffer);
 writeln;
until buffer = '';
writeln;
sock1.free;
end.

output
sock1.lasterror : 0
length(buffer : 86
R
5.5.31-MariaDBs'c@Uh.H��`*O2J[n7eu@{mysql_native_password

length(buffer : 0

length(buffer : 37
!��#08S01Got packets out of order

length(buffer : 0

---

/html > ngrep -x -q -d lo '' 'port 3306'
interface: lo (127.0.0.0/255.0.0.0)
filter: ( port 3306 ) and ((ip) || (vlan && (ip)))

T 127.0.0.1:3306 -> 127.0.0.1:39128 [AP] #4
  52 00 00 00 0a 35 2e 35    2e 33 31 2d 4d 61 72 69    R....5.5.31-Mari
  61 44 42 00 05 00 00 00    21 5a 26 49 7c 56 79 7e    aDB.....!Z&I|Vy~
  00 ff f7 08 02 00 0f a0    15 00 00 00 00 00 00 00    ................
  00 00 00 2d 60 7c 70 3c    7b 75 5d 50 59 4d 57 00    ...-`|p<{u]PYMW.
  6d 79 73 71 6c 5f 6e 61    74 69 76 65 5f 70 61 73    mysql_native_pas
  73 77 6f 72 64 00                                    sword.

T 127.0.0.1:39128 -> 127.0.0.1:3306 [AP] #6
  72 6f 6f 74 0d 0a 6d 79    73 71 6c 0d 0a             root..mysql..

T 127.0.0.1:3306 -> 127.0.0.1:39128 [AP] #8
  21 00 00 01 ff 84 04 23    30 38 53 30 31 47 6f 74    !......#08S01Got
  20 70 61 63 6b 65 74 73    20 6f 75 74 20 6f 66 20     packets out of
  6f 72 64 65 72                                        order

i  have looked at the mysql_real_connect and maridb connector etc code and 
don't see what is going on


_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to