OK, so I've resolved this. For those interested the solution is:
Make sure docker containers are running:
~ : $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
170eadcf370c osixia/openldap:1.1.2 "/container/tool/run" 2 weeks ago Up 13 seconds 0.0.0.0:389->389/tcp, 0.0.0.0:636->636/tcp mattermost-openldap
4d27bf0560e4 postgres:9.4 "/docker-entrypoint.s" 2 weeks ago Up 13 seconds 0.0.0.0:5432->5432/tcp mattermost-postgres
3cafbb96c864 mysql:5.7 "docker-entrypoint.sh" 2 weeks ago Up 13 seconds 0.0.0.0:3306->3306/tcp mattermost-mysql
Then run
docker exec -ti mattermost-mysql /bin/bash
Login to mysql using username and password;
root@3cafbb96c864:/# mysql -u root -p
Enter password: mostest
If you'd like to use an SQL IDE like DataGrip you can make a connection with the following info:
Host:dockerhost
User:mmuser
password:mostest
Or you can just connect using the URL jdbc:mysql://dockerhost:3306