Score:0

Unable to connect to my server

us flag

I'm unable to connect to my own server, which has a MySQL database which I want to access. I correctly opened the 3306 port on the router and called my internet provider that confirmed so. But when I try telnet x.xxx.xxx.x 3306 it stucks on

Trying x.xxx.xxx.x...

Same with traceroute command, the route seems to go till my PC and then find some blockage and it's unable to reach it.

I checked if there is some firewall, but as far as I am aware there aren't.

If I run on my server telnet localhost 3306 it correctly connects.

Romeo Ninov avatar
in flag
On your server you have probably started firewall. Enable your IP in firewall and try again.
Jaromanda X avatar
ru flag
is your public IP address between `100.64.0.0` and `100.127.255.255` by any chance? (doesn't look like it with that `x.xxx.xxx.x` pattern ... but have to ask anyway) ... what does `correctly opened the 3306 port` mean? what does "opened" mean?
user171102 avatar
us flag
@RomeoNinov How can I check if there is some firewall? I'm mounting linux mint and using `ufw status` it gives me **State: Inactive**
user171102 avatar
us flag
@JaromandaX No it is between thos IP addresses. I forwarded the port 3306 on my router, and like I said also my internet provider told me that the port is opened correctly.
Jaromanda X avatar
ru flag
Oh wait - are you trying to connect to public x.x.x.x:3306 from within your LAN? If so, perhaps you've port forwarded, but have you hair-pinned (assuming your router is capable)
user171102 avatar
us flag
No i'm not in a LAN. I'm getting crazy about this. Something blocks the connection. I can't wrap my head around it :)
Score:1
ru flag

you should check if your mysql server instance is listening on your machine ip address and not just on your localhost (127.0.0.1).

you can verify it in two ways:

  1. search in your mysql configuration bind-address option ( on many distro it /etc/mysql/mysql.conf.d/mysqld.cnf ) since by default mysql daemon bind itself on 127.0.0.1 and so it's not reaceable outside your machine.
  2. use a command like ss -pl |grep 3306 in order to check on which ip your mysql instace is binded to.
user171102 avatar
us flag
I already changed bind-address from 127.0.0.1 to 0.0.0.0 But when I use telnet I can see the problem is before mysql. There is something the blocks the connection before.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.