AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() ![]() You can also share a volume between the server and host to make it easier to import data or scripts. This last container will remove itself when you exit the mySQL interface, while the server will continue running. I have a host running mysql (not on a container). This approach gives me the chance to start mysqld and bind it to 0.0.0.0 (all IPs).įor details, please refer to these lines in my GitHub repo. Docker host networking mode Introduction. Instead, I made my own by installing MySQL on Ubuntu 18.04. To make the demo self-contained, I moved all necessary code to. This doesnt exactly address the OPs question but 100 solves mine. My problem was that I couldnt connect from the Django container to the MySQL container. Same advice as maniekq but full example with docker-compose. It seems that you are trying to connect from host to the MySQL container. The password is "wp" which is defined in the docker-compose.yml file. You can pass the -d flag to run the mysql/mariadb container in detached/background mode. 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.5.5-10.1.19-MariaDB-1~jessie binary distributionĬopyright (c) 2000, 2016, Oracle and/or its affiliates. $ mysql -P 8083 -protocol=tcp -u root -p Enter password: Now, you can access the mysql console thusly: Here's how that would work:Ĭreate a file named, docker-compose.yml that looks like this: version: '2' And I can see in the container /var/log/mysql/error.log: ![]() But when I attach my image, I can observe it actually worked as expected (ie: removed the bind-address). Admittedly, there may be cleaner way to do it.
0 Comments
Read More
Leave a Reply. |