MySQL & MariaDB error 4081 ER_DA_GLOBAL_CONN_LIMIT
Same number, two different errors. 4081 means one thing in MySQL and another in MariaDB. Check which server you are connected to.
MySQLConnection closed. Global connection memory limit … bytes exceeded. Consumed … bytes.
MariaDBUnknown structured system variable or ROW routine variable '…'