MySQL remote connection slow

Check out the MySQL compression protocol - handy when there are tons of records to return to a webpage from an external server (especially a WAN)

https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-connections.html

When set to true (or 1), this option enables compression of all information sent between the client and the server if both support compression. The default is no compression (false or 0). If you are connecting using command parameters, the equivalent parameter is --compress (-C). Compression is available for MySQL Shell connections using classic MySQL protocol only. You can set the defaultCompress MySQL Shell configuration option to enable compression for every global session. The MySQL Shell \status command shows whether or not compression is enabled for the session.