"Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2006] MySQL server has gone away" version 2

I’m trying to install NextCloud 15 on VM with Debian 9. And I use database MariaDB 10.1 on another Debian 9 host. I run command ‘sudo -u www-data php occ maintenance:install -vvv --database “mysql” --database-host “DBhostname” --database-name “nextcloud” --database-user “root” --database-pass “rootpass” --database-table-prefix “” --admin-user “admin” --admin-pass “password” --data-dir “PathToDataDir”’ and get error message “Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2006] MySQL server has gone away”. The command creates database “nextcloud” with no tables and users “oc_admin@localhost” and “oc_admin@%”. User “oc_admin@localhost” has no permission to any database, user “oc_admin@%” has all permissions to db “nextcloud”. Moreover I can perform command “mysql -h DBhostname -u oc_admin -p nextcloud” - it allows to connect to the db. So connection to the db works fine. DB settings: wait_timeout=600 max_allowed_packet=128M and all from db setting manual. The command “occ maintenance:install …” does not produce any log record despite of the fact that I write option ‘-vvv’.
How can I trace the error origin? How can I get more information about the issue?

It looks like that it happens when " $dbSetup->runMigrations();" is performing (https://github.com/nextcloud/server/blob/master/lib/private/Setup.php line 350)