In your config.php there's an array for database, within it add a key 'port' with value 3636, like this:
array (
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'flarum_app',
'username' => 'luceos',
'password' => 'temp',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => false,
'port' => 3636
),
You can't do this before installation. You might want to copy your files and database from elsewhere. Once the database is installed you can continue using it as is, just installing won't work without providing a port.