Thread
#general
    a

    andrew1123

    5 months ago
    HI everyone, I am new to supertoken and docker, I am trying to follow this instruction to host the core with docker - https://supertokens.com/docs/emailpassword/quick-setup/database-setup/mysql I have a mysql server running at port 3306 and my ip address is 192.168.1.207, I run the docker command with my env variables, and I got an error saying that "Socket fail to connect to host:192.168.1.207, port:3306. Connection refused". What is wrong here? Thank for your help~
    r

    rp

    5 months ago
    hey @andrew1123
    Is your mysql server listening on all interfaces?
    a

    andrew1123

    5 months ago
    yes, I set it to 0.0.0.0
    the bind_address
    r

    rp

    5 months ago
    And have you changed the "root" user's persmission to allow connecting to it via any address?
    Also, the docker's network setting should be bound to the host
    a

    andrew1123

    5 months ago
    @rp Thanks, maybe that's the problem. I'll have a try!
    @rp I now have a user 'root'@'%' with all privileges, could you give an example or reference on the docker network setting part?
    a

    andrew1123

    5 months ago
    Thank you~
    I replaced
    -p 3567:3567
    with
    --network host
    , am I doing it correctly?
    r

    rp

    5 months ago
    I think u should keep both
    a

    andrew1123

    5 months ago
    It said "Published ports are discarded when using host network mode" when I have both🤔 And I have the same connection refused error
    r

    rp

    5 months ago
    ah i see. So maybe you don't need
    -p 3567:3567
    Are you able to reach the mysql server via the mysql CLI?
    a

    andrew1123

    5 months ago
    I can reach it via mySQL workbench
    r

    rp

    5 months ago
    with host as
    192.168.1.207
    a

    andrew1123

    5 months ago
    the host name is localhost, so I have to change it to 192.168.1.207?
    r

    rp

    5 months ago
    try connecting to the mysql server via mysql workbench with hostname 192.168.1.207
    i don't think this is a supertokens' specific issue
    a

    andrew1123

    5 months ago
    I got the "failed to connect to MySQL at 192.168.1.207:3306 with user root" from mySQL workbench🤔
    r

    rp

    5 months ago
    yea.. so figure out the mysql setup on your computer first 🙂 Then it should work
    a

    andrew1123

    5 months ago
    ok, thanks a lot!