diff --git a/framework/core/src/Install/Console/DefaultsDataProvider.php b/framework/core/src/Install/Console/DefaultsDataProvider.php index 801692e01..a239ef4ff 100644 --- a/framework/core/src/Install/Console/DefaultsDataProvider.php +++ b/framework/core/src/Install/Console/DefaultsDataProvider.php @@ -19,6 +19,7 @@ class DefaultsDataProvider implements DataProviderInterface 'username' => 'root', 'password' => 'root', 'prefix' => '', + 'port' => '3306', ]; protected $baseUrl = 'http://flarum.dev'; diff --git a/framework/core/src/Install/Console/InstallCommand.php b/framework/core/src/Install/Console/InstallCommand.php index 3551be9af..19795f237 100644 --- a/framework/core/src/Install/Console/InstallCommand.php +++ b/framework/core/src/Install/Console/InstallCommand.php @@ -133,7 +133,8 @@ class InstallCommand extends AbstractCommand 'host' => 'required', 'database' => 'required|string', 'username' => 'required|string', - 'prefix' => 'alpha_dash|max:10' + 'prefix' => 'alpha_dash|max:10', + 'port' => 'required|integer|min:1|max:65535', ] ); @@ -203,6 +204,7 @@ class InstallCommand extends AbstractCommand 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => $dbConfig['prefix'], + 'port' => $dbConfig['port'], 'strict' => false ], 'url' => $this->baseUrl, diff --git a/framework/core/src/Install/Controller/InstallController.php b/framework/core/src/Install/Controller/InstallController.php index da2b12b69..e0ab1a854 100644 --- a/framework/core/src/Install/Controller/InstallController.php +++ b/framework/core/src/Install/Controller/InstallController.php @@ -58,6 +58,7 @@ class InstallController implements ControllerInterface 'username' => array_get($input, 'mysqlUsername'), 'password' => array_get($input, 'mysqlPassword'), 'prefix' => array_get($input, 'tablePrefix'), + 'port' => array_get($input, 'mysqlPort'), ]); $data->setAdminUser([ diff --git a/framework/core/views/install/install.php b/framework/core/views/install/install.php index 5d53cd021..aae8128c8 100644 --- a/framework/core/views/install/install.php +++ b/framework/core/views/install/install.php @@ -33,6 +33,11 @@ +