hyochan / talktalk-node

(Deprecated via hackatalk-server) Graphql node project using prisma for talktalk.
Other
17 stars 7 forks source link

add mysql ports #24

Closed joonmyung closed 5 years ago

joonmyung commented 5 years ago

add mysql ports for mysql client tool connection.

codecov[bot] commented 5 years ago

Codecov Report

Merging #24 into master will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #24   +/-   ##
=======================================
  Coverage   42.42%   42.42%           
=======================================
  Files           6        6           
  Lines          33       33           
  Branches        2        2           
=======================================
  Hits           14       14           
  Misses         19       19
cometkim commented 5 years ago

@joonmyung Can you share your case with additional DB tools?

joonmyung commented 5 years ago

@joonmyung Can you share your case with additional DB tools?

In my case, I can't connect docker mysql without ports params. (I used Sequel Pro )

please refer below link. https://github.com/prisma/prisma/issues/1125

hyochan commented 5 years ago

As we said in meetup, let's just handle this personally like below (there may be other way around).

  1. Find port of mysql in docker.

    $ docker port mysql 3306
    0.0.0.0:32768
  2. Find your docker machine IP

    $ docker-machine ip
    192.168.99.100
  3. Connect to mysql with a host of 192.168.99.100:32768.

geoseong commented 5 years ago

@hyochan Did you face the problem when you start npm run docker:up?

Creating network "talktalk-node_default" with the default driver
Creating talktalk-node_mysql_1  ... error
Creating talktalk-node_prisma_1 ... 

ERROR: for talktalk-node_mysql_1  Cannot start service mysql: driver failed programming external connectivity on endpoint talktalk-node_mysql_1 (54e73ec036f52400fc6ba4fdf1d75470d4a8fe037f2a6a66eae8b6947e6b7a86): Error starting userland proxy: Bind for 0.0.0.0:3306 failed:Creating talktalk-node_prisma_1 ... done

ERROR: for mysql  Cannot start service mysql: driver failed programming external connectivity on endpoint talktalk-node_mysql_1 (54e73ec036f52400fc6ba4fdf1d75470d4a8fe037f2a6a66eae8b6947e6b7a86): Error starting userland proxy: Bind for 0.0.0.0:3306 failed: port is already allocated
hyochan commented 5 years ago

@geoseong I think that is another issue. Logs tell you that there is already something listening to 3306 port.

geoseong commented 5 years ago

@hyochan Yeah. This was happening because I hadn't know how to turn off MySQL Server on my computer... I just turned off in my Control Panel, and run talktalk-node's npm run docker:up. so everything is working well. haha 😅