Acorn not working on macOS on vhost

Hey Roots, i would like to create a new project with Sage 10 + Bedrock + Acorn (required).
Im developing on macOS (Apple Silicon - M1) 12.6.1 with virtual host Mamp Pro (latest version).

Im working with…
WordPress : 6.1
PHP : 8.0.23
Composer : 2.4.4
Node : v18.12.0
Yarn : 1.22.19
Mamp Pro : 6.6.4

Bedrock works fine, Sage needs acorn so i installed Acorn with this method "composer require roots/acorn ". My theme is working but not Acorn…

Everytime i run a command “wp acorn help” in the root theme folder, here’s the message :

Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /usr/.../bedrock/web/wp/wp-includes/class-wpdb.php on line 1775
Error: `No such file or directory`
Error establishing a database connection
This either means that the username and password information in your `wp-config.php` file is incorrect or that contact with the database server at `localhost` could not be established. This could mean your host’s database server is down.

Are you sure you have the correct username and password?
Are you sure you have typed the correct hostname?
Are you sure the database server is running?

If you are unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums. `No such file or directory`

I need some help, any idea what i should do?

Thanks to all devs on Roots.io :slight_smile:

Obviously there is something wrong / not being set up completely with regards to your DB – did you answer all the questions provided?

In addition (taken from the Bedrock docs):

“MAMP, XAMPP, and others setups work with Bedrock once the virtual host is configured.”

You could try WP CLI in order to make sure that your DB connection can be established.

1 Like