I have a docker mysql image running, following is what the docker-compose.yml file looks like:
db: image: mysql environment: MYSQL_ROOT_PASSWORD: \"\
this worked for me.
/usr/local/mysql/bin/mysql -h 127.0.0.1 -P 3306 -u root -p