Months later, but maybe this will be useful to somebody.
Be very specific with your DB_HOST in wp-config.php. Because WP isn’t working through Apache on the CLI, you have to explicitly tell it where mysql.sock is located.
I changed my DB_HOST from “localhost” to “localhost:/Applications/MAMP/tmp/mysql/mysql.sock” and it worked like a charm.