Mysqladmin can't connect to database

Having issues trying to get phpunit up and running on a Local install. Using wp-cli to scaffold tests ( and when I run bin/ wordpress_test root root localhost latest mysqladmin can’t connect to the server:
mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'' (using password: YES)'

Running v2.2.4 and my site’s environment is the “Preferred 1.1” nginx, php 7.1.7, mySQL Version 5.6.37

Any help is appreciated.

A bit more info. I was getting some help from some colleagues and we may have tracked it down - but still not sure why it’s happening or how to fix it.

I can successfully connect with
mysql -u root -proot -h localhost
but not with
mysql -u root -proot -h