# GELÖST-Slim Application Error - Could not connect to database - NACH Datenbank-Import

**URL:** <https://forum.shopware.com/t/gelost-slim-application-error-could-not-connect-to-database-nach-datenbank-import/37952>\
**Category:** Installation/Einstieg\
**Created:** [6. Juli 2016 um 00:08 UTC](https://forum.shopware.com/t/gelost-slim-application-error-could-not-connect-to-database-nach-datenbank-import/37952 "2016-07-06T00:08:35Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![vi360](https://avatars.discourse-cdn.com/v4/letter/v/ecb155/32.png) [@vi360](https://forum.shopware.com/u/vi360)\
**Post date:** [6. Juli 2016 um 15:05 UTC](https://forum.shopware.com/t/gelost-slim-application-error-could-not-connect-to-database-nach-datenbank-import/37952/9 "2016-07-06T15:05:24Z")

</div>

Ja, bei der Config hatte ich versucht, den Port über die IP-Adresse zu definieren, wie hier beschrieben:

> **[GELÖST-Slim Application Error - Could not connect to database - NACH...](https://forum.shopware.com/discussion/comment/164979/#Comment_164979)**
>
> Da  gibt  es einen Bug in Shopware. Auch “hier” haben wir wieder einen abweichenden Port - hatten wir im Forum schon mit 5.2  https://forum.shopware.com/discussion/comment/164681/#Comment\_164681 ...

Ursprünglich sah sie so aus:

```
  array (
    'username' => '***',
    'password' => '***',
    'host' => '127.0.0.1',
    'port' => '3309',
    'dbname' => '***,
  ),
 'front' => array( 'showException' => true )
); 

```

Damit lief auch 5.1 ohne Probleme, das Update auf 5.2 bis zum Punkt nach „Aufräumen“.

&nbsp;

Edit: Es lag an /engine/Shopware/Components/DependencyInjection/Bridge/Db.php. Dort gab es in der Funktion buildConnectionString folgenden Eintrag doppelt:

```
 if (!empty($dbConfig['socket'])) {
            $connectionSettings[] = 'unix_socket=' . $dbConfig['socket'];
        }

```

Einen davon umändern in

```
if (!empty($dbConfig['port'])) {
            $connectionSettings[] = 'port=' . $dbConfig['port'];
        }

```

und das Update lief durch.

---

_[View the full topic](https://forum.shopware.com/t/gelost-slim-application-error-could-not-connect-to-database-nach-datenbank-import/37952)._
