How do I get past this MySQL error installing Craft 3 using CLI I am using https://box.scotch.io/ (vagrant).

I'm trying to install Craft 3 with the cli, but can't get past these errors:


Connection refused 
No such file or directory


One or the other error shows up depending on what I use for the host name.


I have tried the answer here.
I can connect fine with Sequel Pro using the same credentials.


(Note: I did intentionally change the db name and password from the defaults that came with Scotchbox, and have successfully connected with those new details using Sequel Pro).

See log:

Which database driver are you using? [mysql,pgsql,?]: mysql
Database server name or IP address: [192.168.33.10] 
Database port: [3306] 
Database username: [root] 
Database password: 
Database name: [craft] 
Database table prefix: 
Testing database credentials... failed: SQLSTATE[HY000] [2002] Connection refused
Which database driver are you using? [mysql,pgsql,?]: mysql
Database server name or IP address: [192.168.33.10] localhost
Database port: [3306] 
Database username: [root] 
Database password: 
Database name: [craft] 
Database table prefix: 
Testing database credentials... failed: SQLSTATE[HY000] [2002] No such file or directory
Which database driver are you using? [mysql,pgsql,?]: mysql
Database server name or IP address: [localhost] 127.0.0.1
Database port: [3306] 
Database username: [root] 
Database password: 
Database name: [craft] 
Database table prefix: 
Testing database credentials... failed: SQLSTATE[HY000] [2002] Connection refused
This is all very specific to the box you're using, and how it's configured. I realize Scotch Box is a historically popular setup; you might also consider Homestead as it is geared specifically for PHP development.

Anyway, according to the Scotch Box docs the setup should be:

Database Host: localhost
Database User: root
Database Password: root

Which I assume you're doing in the second example? You are also running all of this from inside of the box, yes?