![]() ![]() WARNING: The Docker Engine you're using is running in swarm mode.Ĭompose does not use swarm mode to deploy services to multiple nodes in a swarm. When trying the same thing with docker-compose, everything works fine.Įxpected behavior (docker compose) $ docker-compose up -d "EndpointID": "bfcfc9ece87d65a31191e926701a2da1fc747c0faeab869cebee69a60b957e92",Įxpected behavior would be that the environmental variable MYSQL_ROOT_PASSWORD is set as defined in the container. "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "ResolvConfPath": "/mysql-tester_db.1.5lw73wrxzwppkhy26ym0vk9vh", You need to specify one of the following:įrom docker inspect it appears that the Config.Cmd reflects my docker-compose.yml settings, but the Config.Env does not.ĭocker inspect $ sudo docker inspect $(sudo docker ps -q -filter name=mysql-tester_db) 19:35:28+00:00 : Database is uninitialized and password option is not specified $ sudo docker logs $(sudo docker ps -q -filter name=mysql-tester_db) $ # the following two command only work if a new container is started and not yet crashed - in practice I only get output once in every few tries of the same command U21trxihjmas \_ mysql-tester_db.1 mysql:latest NAS Shutdown Failed 42 seconds ago "task: non-zero exit (1)" Izddw0mvn0e9 \_ mysql-tester_db.1 mysql:latest NAS Shutdown Failed 30 seconds ago "task: non-zero exit (1)" Yyxwor45t6jk \_ mysql-tester_db.1 mysql:latest NAS Shutdown Failed 18 seconds ago "task: non-zero exit (1)" Pzko4nzra8fk \_ mysql-tester_db.1 mysql:latest NAS Shutdown Failed 6 seconds ago "task: non-zero exit (1)" Nd165ye84yfs mysql-tester_db.1 mysql:latest NAS Running Starting 1 second ago Ux3wysxllr3e mysql-tester_adminer.1 adminer:latest NAS Running Running 55 seconds ago ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS From what I can tell so far, the issue is not related to MySQL.Ĭontents of docker-compose.yml: version: '3.8'Ĭommand: -default-authentication-plugin=mysql_native_passwordĪctual behavior: $ sudo docker stack deploy -c docker-compose.yml mysql-tester The configuration that I’m sharing is based on MySQL docker documentation. I can get the configuration to work with docker-compose. Issue: I can’t get docker stack deploy to work with the environment runtime argument. ![]() There is probably a rookie mistake hidden in here, but I can’t get my head around it and I’m looking forward to your help! I’ve been struggling with an seemingly simple set-up for several days now. I think if I uninstall mysql server from the host I'll be able to connect to the docker database, but surely there's a better approach.I’m new to the forum and docker swarm relatively new to docker in general. ![]() ![]() Nicholas $ mysql -h localhost -P 3306 -protocol=tcp -u root -p Yet that's not happening, I'm getting the host's database: nicholas $ Root $ docker inspect mysql | grep passwordĪnd so I was expecting that by specifying tcp for localhost from the host I'd be able to connect to the docker container. Which is virgin, not having user user configured on the container. Root $ docker exec -ti -user root mysql bash I'm trying that explicit IP address because: root $Īlthough I'm also getting the same result for localhost in that I'm still logging into the host instance of MySQL rather than the container. Type '\c' to clear the current input statement. Other names may be trademarks of their respective Oracle is a registered trademark of Oracle Corporation and/or itsĪffiliates. Server version: 8.0.21 MySQL Community Server - GPLĬopyright (c) 2000, 2020, Oracle and/or its affiliates. Trying to login to the container, but getting the host MySQL instance: nicholas $ Starting up the default mysql server: root $ ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |