Skip to content

Commit 799b8a7

Browse files
committed
database command fixes
1 parent cf41060 commit 799b8a7

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DB_HOST=127.0.0.1
1111
DB_PORT=3306
1212
DB_DATABASE=panel
1313
DB_USERNAME=pterodactyl
14-
DB_PASSWORD=secret
14+
DB_PASSWORD=
1515

1616
CACHE_DRIVER=redis
1717
SESSION_DRIVER=database

app/Console/Commands/Environment/DatabaseSettingsCommand.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ class DatabaseSettingsCommand extends Command
4545
*/
4646
protected $signature = 'p:environment:database
4747
{--host= : The connection address for the MySQL server.}
48-
{--port= : The connection port for the MySQL server.}';
48+
{--port= : The connection port for the MySQL server.}
49+
{--database= : The database to use.}
50+
{--username= : Username to use when connecting.}
51+
{--password= : Password to use for this database.}';
4952

5053
/**
5154
* @var array
@@ -86,12 +89,12 @@ public function handle()
8689
trans('command/messages.environment.database.port'), $this->config->get('database.connections.mysql.port', 3306)
8790
);
8891

89-
$this->variables['DB_DATABASE'] = $this->option('port') ?? $this->ask(
92+
$this->variables['DB_DATABASE'] = $this->option('database') ?? $this->ask(
9093
trans('command/messages.environment.database.database'), $this->config->get('database.connections.mysql.database', 'panel')
9194
);
9295

9396
$this->output->note(trans('command/messages.environment.database.username_warning'));
94-
$this->variables['DB_USERNAME'] = $this->option('port') ?? $this->ask(
97+
$this->variables['DB_USERNAME'] = $this->option('username') ?? $this->ask(
9598
trans('command/messages.environment.database.username'), $this->config->get('database.connections.mysql.username', 'pterodactyl')
9699
);
97100

0 commit comments

Comments
 (0)