Skip to content

Commit 1800c46

Browse files
author
Afonso Gloeden
committed
Connection port separate from connection host
1 parent e052913 commit 1800c46

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Update the package dependencies executing:
2626
composer update
2727
```
2828

29-
Add the following entry to your providers array in **config/app.php** file:
29+
Add the following entry to your providers array in **config/app.php** file:
3030

3131
```php
3232
Uepg\LaravelSybase\Database\SybaseServiceProvider::class
@@ -46,13 +46,14 @@ return [
4646
...
4747

4848
'sqlsrv' => [
49-
'driver' => 'sqlsrv',
50-
'host' => env('DB_HOST', 'sybase.myserver.br:5000'),
49+
'driver' => 'sqlsrv',
50+
'host' => env('DB_HOST', 'sybase.myserver.com'),
51+
'port' => env('DB_PORT', '5000'),
5152
'database' => env('DB_DATABASE', 'mydatabase'),
52-
'username' => env('DB_USERNAME', 'forge'),
53-
'password' => env('DB_PASSWORD', 'secret'),
54-
'charset' => 'utf8',
55-
'prefix' => '',
53+
'username' => env('DB_USERNAME', 'user'),
54+
'password' => env('DB_PASSWORD', 'password'),
55+
'charset' => 'utf8',
56+
'prefix' => '',
5657
],
5758

5859
...
@@ -62,6 +63,21 @@ return [
6263
]
6364
```
6465

66+
Update your **.env** with the settings for the **sqlsrv** or your custom odbc. See the following example:
67+
68+
```text
69+
...
70+
71+
DB_CONNECTION=sqlsrv
72+
DB_HOST=sybase.myserver.com
73+
DB_PORT=5000
74+
DB_DATABASE=mydatabase
75+
DB_USERNAME=user
76+
DB_PASSWORD=password
77+
78+
...
79+
```
80+
6581
## Configuration of freetds driver
6682

6783
In Linux systems the driver version must be set in **freetds.conf** file to the right use of charset pages.

0 commit comments

Comments
 (0)