Skip to content

Commit

Permalink
Added custom port to mysql connection param
Browse files Browse the repository at this point in the history
  • Loading branch information
Leandro Menezes authored and gabrielrcouto committed Aug 21, 2020
1 parent e01ef62 commit cb0be18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ DB_DATABASE_NAME=medicine
DB_USERNAME=mysql_user
DB_PASSWORD=secret
DB_HOST=mysql-server
DB_PORT=3306

IGNORE_COLUMNS=password,hidden_column,another_column
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ DB_DATABASE_NAME=mysql-database-name
DB_USERNAME=mysql_username
DB_PASSWORD=mysql_password
DB_HOST=mysql-host
DB_PORT=3306
IGNORE_COLUMNS=password,hidden_column,another_column
```
Expand Down
1 change: 1 addition & 0 deletions src/Database/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function getConnection(string $databaseName)
'user' => $_ENV['DB_USERNAME'],
'password' => $_ENV['DB_PASSWORD'],
'host' => $_ENV['DB_HOST'],
'port' => $_ENV['DB_PORT'],
'charset' => 'utf8',
// Special doctrine driver, with reconnect attempts support
'wrapperClass' => 'Facile\DoctrineMySQLComeBack\Doctrine\DBAL\Connection',
Expand Down

0 comments on commit cb0be18

Please sign in to comment.