Sage Theme : `wp acorn` -> Error establishing a database connection


I have some problemes with acorn, and i don’t find my response in topics. I’ll like to use it for install a simple breadcrumb package for Sage 10 (Log1x/crumb).

I setup my bedrock project with Docker.

My command line wp seems working fine, here wp --info :

OS: Darwin 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:51 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6030 arm64
Shell:  /bin/zsh
PHP binary:     /opt/homebrew/Cellar/php/8.3.0/bin/php
PHP version:    8.3.0
php.ini used:   /opt/homebrew/etc/php/8.3/php.ini
MySQL binary:   
MySQL version:  
SQL modes:      
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /Users/olivierpierre/Dev/lab_espaces_publics/bedrock/web/app/themes/labeps-theme
WP-CLI packages dir:    
WP-CLI cache dir:       /Users/olivierpierre/.wp-cli/cache
WP-CLI global config:   
WP-CLI project config:  /Users/olivierpierre/Dev/lab_espaces_publics/bedrock/wp-cli.yml
WP-CLI version: 2.9.0

So when i use the command line with acorn i have this error Error establishing a database connection..

Thanks for help

Sure, but i don’t find my response in all topics.

Where are you running the wp acorn command? Since you are using Docker, you need to be running that inside the container. I believe that’s the most common reason people run into that error.


Thanks for your answer !

I had an over problem with acorn No publishable resources for tag [] who is fixed with this topic acorn issue.