Hello there,
MariaDB should indeed work fine with a normal MySQL connection string (that is, mysql: is fine). I believe you will need to specify the port using the port= parameter rather than using a colon and port number after the host value. Given your example, this would become:
mysql:host=mariadb.myserver.com;port=3310;dbname=XYZ;
I tested this on a remotely hosted MySQL DB of my own. The DB connection fails with host=hostname:port but works fine with host=hostname;port=port.
Please try using the port= parameter in your connection string, and let me know if that works.
Regards,
Jeffrey