Moodle installation checks for below 3 global variables values:
(1) innodb_file_format=Barracuda
(2) innodb_file_per_table = 1,
(3) innodb_large_prefix = `ON`
and installation fails in case above values not set.
Above 3 global variables are removed in MySQL 8.0 and MariaDB 10.3 (https://mariadb.com/kb/en/library/changes-improvements-in-mariadb-103/#system-variables),
Hence Moodle 3.8.2 installation fails for MySQL 8.0 and MariaDB 10.3