Reputation: 1360
I have installed a craft cms project with craftman which uses docker. Now I am trying to connect to the DB with sequel pro, but I can't. I have run the craftman ip
command to get the ip of the docker container
, which in my case was 172.17.0.2
and then I have run the docker ps command to get the port of the DB which was 3306/tcp
.
I have tried to connect with these settings then in sequel pro
:
Host: 172.17.0.2
Username: root
Password:
Database: craft
Port: 3306
This is the output of docker ps
:
c29d64fd09ca mariadb:10.1 "docker-entrypoint..." 12 days ago Up 14 hours 3306/tcp forandringsfabrikkencraft_mysql_1
But, I can't connect. How can I get the settings to connect to DB in docker?
Upvotes: 1
Views: 2055
Reputation: 71
I've experienced the same problem.
Running: $ docker ps
Gave the response:
PORTS 0.0.0.0:3306->3306/tcp mysql-server
Which told me to use '0.0.0.0' as host IP.
Hope this helps.
Upvotes: 3