I’m having issues running acorn and I unfortunately cannot find how to resolve it.
I’ve created a new project using trellis and have a Vagrant instance up and running and can log in fine. I can also ssh into the Vagrant machine.
I’ve installed acorn via composer from the /site
directory with composer require roots/acorn
, this resulted in a successful install with "roots/acorn": "^2.1"
However when I try to run wp acorn from OSX I get this error.
PHP Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /Users/xxx/xxx/xxx/site/web/wp/wp-includes/class-wpdb.php on line 1775
Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /Users/xxx/xxx/xxx/site/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 am installing GitHub - generoi/sage-woocommerce and it says to run a few acorn commands to set things up.
I’ve never been able to run wp
commands directly from OSX but it seemed to be where I needed to run them from. When it didn’t work I tried to ssh into the Vagrant, cd to the current
directory and run them from there. However, then I get the error below. wp user info
works fine in the Vagrant though. It gives the same mysqli_real_connect
when run from OSX.
Error: 'acorn' is not a registered wp command. See 'wp help' for available commands.
Did you mean 'core'?
I’m confused as to what I am doing wrong. Any assistance would be appreciated.
Thank you in advance.