# Fehlermeldung bei Verwendung der Shopware Console (MAMP, OSX, Terminal)

**URL:** https://forum.shopware.com/t/fehlermeldung-bei-verwendung-der-shopware-console-mamp-osx-terminal/43273
**Category:** Programmierung
**Created:** [31. Januar 2017 um 13:06 UTC](https://forum.shopware.com/t/fehlermeldung-bei-verwendung-der-shopware-console-mamp-osx-terminal/43273 "2017-01-31T13:06:29Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Sebbe](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sebbe/32/17839_2.png) [@Sebbe](https://forum.shopware.com/u/Sebbe)
#### Post date: [31. Januar 2017 um 13:06 UTC](https://forum.shopware.com/t/fehlermeldung-bei-verwendung-der-shopware-console-mamp-osx-terminal/43273/1 "2017-01-31T13:06:29Z")

</div>

Hi zusammen,

ich versuche gerade lokal über den Terminal einen theme dump durchzuführen. Dazu führe ich php bin/console sw:theme:dump:configuration aus, doch erhalte nur eine Fehlermeldung, dass keine Verbindung zur Datenbank hergestellt werden kann.  
Ich verwende OS X in Verbindung mit MAMP 3.2.1. Die Fehlermeldung lautet:

WARNING! Could not connect to database. Message from SQL Server: SQLSTATE[HY000] [2002] No such file or directory in /Users/boettcher/PhpstormProjects/h24\_sw5\_2/engine/Shopware/Components/DependencyInjection/Bridge/Db.php&nbsp;

[Symfony\Component\DependencyInjection\Exception\RuntimeException] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  
You have requested a synthetic service („db\_connection“). The DIC does not know how to construct this service.

Der Shop wird, im übrigen, über den Browser einwandfrei dargestellt. Ich kann ihn administrieren und editieren.

Ich hoffe, dass einer einen Tipp hat.  
Vielen Dank im Voraus.

---

<div class="post-metadata">

### Author: ![Stephan\_Pohl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/stephan_pohl/32/10212_2.png) [@Stephan\_Pohl](https://forum.shopware.com/u/Stephan_Pohl)
#### Post date: [31. Januar 2017 um 14:36 UTC](https://forum.shopware.com/t/fehlermeldung-bei-verwendung-der-shopware-console-mamp-osx-terminal/43273/2 "2017-01-31T14:36:33Z")

</div>

Hey @Sebbe‍,

du musst die MySQL Installation in deiner $PATH Variable zur Verfügung stellen. Füge folgendes in deiner .bashrc hinzu:

```
export PATH="/Applications/MAMP/Library/bin:$PATH"

```

Viele Grüße,  
Stephan

---

<div class="post-metadata">

### Author: ![Sebbe](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sebbe/32/17839_2.png) [@Sebbe](https://forum.shopware.com/u/Sebbe)
#### Post date: [31. Januar 2017 um 15:28 UTC](https://forum.shopware.com/t/fehlermeldung-bei-verwendung-der-shopware-console-mamp-osx-terminal/43273/3 "2017-01-31T15:28:26Z")

</div>

Hi [@Stephan Pohl]([http://forum.shopware.com/profile/2/Stephan](http://forum.shopware.com/profile/2/Stephan) Pohl “Stephan Pohl”)‍,

danke, für deine Antwort.  
Dank deiner&nbsp;Informationen konnte ich noch etwas googlen und ich las, dass ich die .bash\_profile ebenfalls editierbar ist und gleichen Effekt auslösen solle.  
Ich habe diese Datei also editiert und erhalte nun bei echo $PATH folgendes zurück:  
/Applications/MAMP/Library/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Ich finde, dass das schonmal gut aussieht. Allerdings bleibt der Fehler auch nach Neustart des Terminals und Mamps bestehen.  
Ich habe mich auch in den /Applications/MAMP/Library/bin Ordner navigiert und dort ist unter anderem die MySQL Installtion vorhanden.  
Auch kann ich jetzt den Befehl “mysql” innerhalb des Terminals nutzen.&nbsp;

---

<div class="post-metadata">

### Author: ![Stephan\_Pohl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/stephan_pohl/32/10212_2.png) [@Stephan\_Pohl](https://forum.shopware.com/u/Stephan_Pohl)
#### Post date: [6. Februar 2017 um 11:20 UTC](https://forum.shopware.com/t/fehlermeldung-bei-verwendung-der-shopware-console-mamp-osx-terminal/43273/4 "2017-02-06T11:20:23Z")

</div>

Hey @Sebbe‍,

ggf. musst du noch die PHP-Installation von MAMP mit in die $PATH Variable aufnehmen. Hier einmal mal exemplarisch meine $PATH Variable:

```
/Users/klarstil/.rbenv/shims:/Users/klarstil/bin:/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php/php7.0.8/bin:/Applications/PHPStorm EAP.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

```

Viele Grüße,  
Stephan

---

<div class="post-metadata">

### Author: ![Sebbe](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sebbe/32/17839_2.png) [@Sebbe](https://forum.shopware.com/u/Sebbe)
#### Post date: [13. Februar 2017 um 09:39 UTC](https://forum.shopware.com/t/fehlermeldung-bei-verwendung-der-shopware-console-mamp-osx-terminal/43273/5 "2017-02-13T09:39:38Z")

</div>

Hey [@Stephan Pohl]([http://forum.shopware.com/profile/2/Stephan](http://forum.shopware.com/profile/2/Stephan) Pohl “Stephan Pohl”)‍ ,

leider hat auch das nicht geholfen. Hier meine aktuelle $PATH Variable:

```
/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php/php7.0.10/bin:/Applications/PHPStorm

```

Hier der Fehler, wenn ich php bin/console innerhalb des Shopverzeichnisses aufrufe:

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/0a2cc9cf4ea91a1f7767c5139375559da957c9f5.png)  
Und hier der Fehler, wenn ich den dump ausführen möchte:

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/e50add3fc9f66dee965ecd100ce8e3265b1adbc9.png)

Vielen Dank nochmal für deine bisherigen Antworten  
Beste Grüße  
Sebastian

---

<div class="post-metadata">

### Author: ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)
#### Post date: [13. Februar 2017 um 22:17 UTC](https://forum.shopware.com/t/fehlermeldung-bei-verwendung-der-shopware-console-mamp-osx-terminal/43273/6 "2017-02-13T22:17:24Z")

</div>

Oder du änderst stumpf den host in der config.php auf 127.0.0.1

---

<div class="post-metadata">

### Author: ![Sebbe](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sebbe/32/17839_2.png) [@Sebbe](https://forum.shopware.com/u/Sebbe)
#### Post date: [14. Februar 2017 um 08:16 UTC](https://forum.shopware.com/t/fehlermeldung-bei-verwendung-der-shopware-console-mamp-osx-terminal/43273/7 "2017-02-14T08:16:00Z")

</div>

> [@Shyim schrieb:](https://forum.shopware.com/profile/20792/Shyim "Shyim")
> 
> Oder du änderst stumpf den host in der config.php auf 127.0.0.1

Perfekt, hat problemlos geklappt. Vielen Dank dafür.  
Hätte nicht gedacht, dass es so einen Unterschied macht ob localhost oder 127.0.0.1 eingetragen ist. 🙂

---

<div class="post-metadata">

### Author: ![opal-country](https://avatars.discourse-cdn.com/v4/letter/o/e47c2d/32.png) [@opal-country](https://forum.shopware.com/u/opal-country)
#### Post date: [9. Mai 2022 um 11:23 UTC](https://forum.shopware.com/t/fehlermeldung-bei-verwendung-der-shopware-console-mamp-osx-terminal/43273/8 "2022-05-09T11:23:20Z")

</div>

DANKE!!! Hat mir geholfen!
