![]() ![]() Based on these threads I have followed the following steps. "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", All rights reserved.īut, if I try to connect from my host to the mysql server running in the docker container, I am unsuccessful: ~$ mysql -h 127.0.0.1:3306 -u root -pĮRROR 2005 (HY000): Unknown MySQL server host '127.0.0.1:3306' (0) Server version: 8.0.21 MySQL Community Server - GPLĬopyright (c) 2000, 2020, Oracle and/or its affiliates. ~$ docker exec -it my-mysql mysql -u root -p ![]() Next, if I run a mysql server inside a docker container, I can successfully connect to the mysql server from within the container: ~$ docker run -rm -name my-mysql -e MYSQL_ROOT_PASSWORD=kathy -p 3606:3606 -d mysqlħ457d62496b109fda41b57dea026cc6762bb2b7e754cb3e1987228b55ec461f7ĬONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESħ457d62496b1 mysql "docker-entrypoint.s…" 2 seconds ago Up 2 seconds 3306/tcp, 33060/tcp, 0.0.0.0:3606->3606/tcp my-mysql You can turn off this feature to get a quicker startup with -A ![]() Reading table information for completion of table and column names 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.4.13-MariaDB HomebrewĬopyright (c) 2000, 2015, Oracle and/or its affiliates. 200805 13:41:03 mysqld_safe Logging to '/usr/local/var/mysql/'.Ģ00805 13:41:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql If I start a mysql server(mariadb) on my host (not using docker), I can use the mysql client to successfully connect to the mysql server: ~$ rver start I am unable to connect from my host(OSX 10.13.6) to a mysql server running in a docker container. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |