Fix for MySQL 5.1 server handshake

Fix for MySQL 5.1 server handshake