# The "db\_connection" service is synthetic, it needs to be set at boot time before it can be used.

**URL:** https://forum.shopware.com/t/the-db-connection-service-is-synthetic-it-needs-to-be-set-at-boot-time-before-it-can-be-used/62721
**Category:** International (English Only)
**Created:** [31. Oktober 2019 um 13:21 UTC](https://forum.shopware.com/t/the-db-connection-service-is-synthetic-it-needs-to-be-set-at-boot-time-before-it-can-be-used/62721 "2019-10-31T13:21:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ronaksolanki10](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@ronaksolanki10](https://forum.shopware.com/u/ronaksolanki10)
#### Post date: [31. Oktober 2019 um 13:21 UTC](https://forum.shopware.com/t/the-db-connection-service-is-synthetic-it-needs-to-be-set-at-boot-time-before-it-can-be-used/62721/1 "2019-10-31T13:21:53Z")

</div>

When I execute the command php&nbsp;bin/console doctrine:schema: update --force, it gives me the following error.&nbsp;

WARNING! I could not connect to the database. Message from SQL Server: SQLSTATE[HY000] [2002] No such file or directory in /opt/lampp/htdocs/ams/engine/Shopware/Components/DependencyInjection/Bridge/Db.php&nbsp;  
&nbsp;

In Container.php line 334:  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;  
&nbsp; The “db\_connection” service is synthetic, it needs to be set at boot time before it can be used.

---

<div class="post-metadata">

### Author: ![MrAle](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@MrAle](https://forum.shopware.com/u/MrAle)
#### Post date: [6. Dezember 2019 um 10:46 UTC](https://forum.shopware.com/t/the-db-connection-service-is-synthetic-it-needs-to-be-set-at-boot-time-before-it-can-be-used/62721/2 "2019-12-06T10:46:57Z")

</div>

change in your config.php from “localhost” to “127.0.0.1” did it for me

---

<div class="post-metadata">

### Author: ![ronaksolanki10](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@ronaksolanki10](https://forum.shopware.com/u/ronaksolanki10)
#### Post date: [7. Dezember 2019 um 13:42 UTC](https://forum.shopware.com/t/the-db-connection-service-is-synthetic-it-needs-to-be-set-at-boot-time-before-it-can-be-used/62721/3 "2019-12-07T13:42:37Z")

</div>

> [@MrAle schrieb:](https://forum.shopware.com/profile/31267/MrAle "MrAle")
> 
> change in your config.php from „localhost“ to „127.0.0.1“ did it for me
> 
> &nbsp;
> 
> **Yes working, Thank you**
