diff --git a/.env.example b/.env.example index e5616420b..522bb7286 100644 --- a/.env.example +++ b/.env.example @@ -11,7 +11,7 @@ DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=panel DB_USERNAME=pterodactyl -DB_PASSWORD=secret +DB_PASSWORD= CACHE_DRIVER=redis SESSION_DRIVER=database diff --git a/app/Console/Commands/Environment/DatabaseSettingsCommand.php b/app/Console/Commands/Environment/DatabaseSettingsCommand.php index f99c155be..02396142c 100644 --- a/app/Console/Commands/Environment/DatabaseSettingsCommand.php +++ b/app/Console/Commands/Environment/DatabaseSettingsCommand.php @@ -45,7 +45,10 @@ class DatabaseSettingsCommand extends Command */ protected $signature = 'p:environment:database {--host= : The connection address for the MySQL server.} - {--port= : The connection port for the MySQL server.}'; + {--port= : The connection port for the MySQL server.} + {--database= : The database to use.} + {--username= : Username to use when connecting.} + {--password= : Password to use for this database.}'; /** * @var array @@ -86,12 +89,12 @@ class DatabaseSettingsCommand extends Command trans('command/messages.environment.database.port'), $this->config->get('database.connections.mysql.port', 3306) ); - $this->variables['DB_DATABASE'] = $this->option('port') ?? $this->ask( + $this->variables['DB_DATABASE'] = $this->option('database') ?? $this->ask( trans('command/messages.environment.database.database'), $this->config->get('database.connections.mysql.database', 'panel') ); $this->output->note(trans('command/messages.environment.database.username_warning')); - $this->variables['DB_USERNAME'] = $this->option('port') ?? $this->ask( + $this->variables['DB_USERNAME'] = $this->option('username') ?? $this->ask( trans('command/messages.environment.database.username'), $this->config->get('database.connections.mysql.username', 'pterodactyl') );