How to fix «The process "'/usr/bin/php7.1' 'app/console' 'oro:migration:load' '--force' '--timeout=300' '--env=prod'" exceeded the timeout of 300 seconds»?

Step 1. Re-create the OroCRM database (because it could be broken).

mysql -e "DROP DATABASE crm; CREATE DATABASE crm;"

Step 2. Re-run the «app/console oro:install» command with the additional «–timeout=0» key

app/console oro:install --env=prod --timeout=0