I am running WordPress with wp-env
and docker
configuration,
I want to connect to mysql via cli but I keep getting this error:
zsh: command not found: mysql
I have tried: mysql -h 127.0.0.1:3308 -u root -p
and in post 3306 as well
this is my docker-compose.yaml
file
phpmyadmin works great
version: '3.1'
services:
mysql:
image: mysql:5.7
ports:
- 3308:3306
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress_test
phpmyadmin:
depends_on:
- mysql
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
restart: always
ports:
- '8080:80'
environment:
PMA_HOST: mysql
volumes:
testsuite:
`
What I did was to execute the following command:
docker exec -it {container name} bash -l