The "db_connection" service is synthetic, it needs to be set at boot time before it can be used.

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

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 
 

In Container.php line 334:
                                                                                                    
  The “db_connection” service is synthetic, it needs to be set at boot time before it can be used.

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

1 „Gefällt mir“

@MrAle schrieb:

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

 

Yes working, Thank you