HI everyone, I am new to supertoken and docker, I ...
# general
a
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
hey @andrew1123
Is your mysql server listening on all interfaces?
a
yes, I set it to 0.0.0.0
the bind_address
r
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
@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
Thank you~
I replaced
Copy code
-p 3567:3567
with
Copy code
--network host
, am I doing it correctly?
r
I think u should keep both
a
It said "Published ports are discarded when using host network mode" when I have both🤔 And I have the same connection refused error
r
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
I can reach it via mySQL workbench
r
with host as
192.168.1.207
a
the host name is localhost, so I have to change it to 192.168.1.207?
r
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
I got the "failed to connect to MySQL at 192.168.1.207:3306 with user root" from mySQL workbench🤔
r
yea.. so figure out the mysql setup on your computer first 🙂 Then it should work
a
ok, thanks a lot!
7 Views