Wordpress Example in Docker compose fails

yup… copied the example exactly issuing this from the mysql container cli and i get…

root@43a759f6ae7b:/# mysql -u root -pwordpress
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

The mysql environment variables are;
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress

I just can’t explain why I can’t login to the mysql db - I’m going nuts here.