Skip to content

Commit b368a85

Browse files
committed
added tcp port support
1 parent 66e27bc commit b368a85

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

console/controllers/MysqlController.php

+2
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ public function actionExport()
248248
$command = new Command('mysqldump');
249249

250250
$command->addArg('-h', getenv('DB_PORT_3306_TCP_ADDR'));
251+
$command->addArg('-P', getenv('DB_PORT_3306_TCP_PORT'));
251252
$command->addArg('-u', getenv('DB_ENV_MYSQL_USER'));
252253
$command->addArg('--password=', getenv('DB_ENV_MYSQL_PASSWORD'));
253254
$command->addArg('--no-create-info');
@@ -312,6 +313,7 @@ public function actionXDump()
312313
$truncateTable = '';
313314

314315
$command->addArg('-h', getenv('DB_PORT_3306_TCP_ADDR'));
316+
$command->addArg('-P', getenv('DB_PORT_3306_TCP_PORT'));
315317
$command->addArg('-u', getenv('DB_ENV_MYSQL_USER'));
316318
$command->addArg('--password=', getenv('DB_ENV_MYSQL_PASSWORD'));
317319
$command->addArg(getenv('DB_ENV_MYSQL_DATABASE'));

0 commit comments

Comments
 (0)