In my MySQL container that I have configured per the official image, it does not allow me to access the CLI from my host machine, nor any other of my containers, despite being linked:
Now, I know that I have not configured external access on my MySQL container, but how can I configure it if I can't even access the CLI to grant myself permissions? Could I create a Dockerfile
and change some system settings before the initial installation of MySQL? If so, how would I go about doing that?
My fig.yml
file, which is used to set up my MySQL container:
mysql:
image: mysql:latest
volumes:
- .:/mydir
working_dir: /mydir
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=mydb
- MYSQL_ROOT_PASSWORD=mypass
The answer is in your screenshot. (using password: NO). Add a -p to your mysql command line.