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: 5.7.9-log MySQL Community Server (GPL)Ĭopyright (c) 2000, 2015, Oracle and/or its affiliates. Mysql: Using a password on the command line interface can be insecure. Now we get the address of the virtual machine, so that we can connect to its MySQL port. Here the port 3306 of the container is attached to the port 3306 to the host (= the virtual machine). This approach works: $ docker rm -v -f mybox ![]() The only way of connecting a local client to the container is by exposing explicitly the MySQL port to the external (and in this case the "external" is the virtual machine itself) and then connect to the virtual machine. And of course it did not work: I was trying to connect from my Mac to a container inside a virtual machine which uses a different subnet and cannot be reached without indirection. Thus I hadn't tried this particular example on a Mac until I went on stage. When I came back to the hotel, I realised what was different: I had done all the tests for the first article on Linux only, and I started testing on Mac when using the material for the second article. Everything that I tried at home was working, except connecting from the external client to the server inside a container. The installation of three nodes in replication went well. I have it pasted into my first article of the series. Step 3: connect to the container from a local client.$ docker run -d -name mybox -e MYSQL_ROOT_PASSWORD=secret mysql/mysql-serverĥ0acff1c7d237b2944f3fbdd5d230e4ecca2bcccd4e4ba06aa778ee20d41631e There was one step that I tried some time ago, and had always worked well, but when I tried to repeat it on stage, it failed miserably: Yesterday I was giving a presentation about Docker in Buenos Aires, and as usual I included a long live demo. This is a quick post only indirectly related to the series of articles about Docker that I have written recently.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |