Packets out of order. Error retrieving data from MariaDB

According to the PHP documentation,

PDO::ATTR_EMULATE_PREPARES Enables or disables emulation of prepared statements. Some drivers do not support native prepared statements or have limited support for them. Use this setting to force PDO to either always emulate prepared statements (if TRUE), or to try to use native prepared statements (if FALSE). It will always fall back to emulating the prepared statement if the driver cannot successfully prepare the current query. Requires bool.

If this indeed is the fix, try adding the driver attribute to your service configuration in DreamFactory.