Xojo 2017 R1.1 (and earlier versions)
MySQL 5.7.18 Community Server running on Windows Server 2012R2.
I get database error 2027 Malformed Packet frequently. Not every query, but most. Sometimes a slight change to the query (like adding WHERE 1=1) makes the problem go away temporarily.
Have you checked the usual suspects for that error? Could be an encoding issue, or some other specific config issue.
If none of the standard suggestions you can find by searching the error on google help, the next thing I would do is probably fire up wireshark or a similar tool and take a look at some packets. If you capture on the server side you should be able to get a set of packets from both platforms and compare.