Score:0

Mysql remote connect CentOS

us flag

i have problem with mysql remote connect. In my.cnf have: bind-address = 0.0.0.0 and #skip-networking. In users mysql have special user remote@% And still not working.

If i try: nmap -p 3306 remote.ip.com

Output is:

PORT       STATE      SERVICE
3306/tcp   filtered   mysql

It is way ?

Thanks, Regards.

jm flag
Do you have either `iptables` or `firewalld` blocking the connection?
ondravirag avatar
us flag
@doneal24 firewalld -- is off, and iptables i add rule
dominix avatar
gf flag
show us what give ```netstat -pnlt|grep mysql```. If we see a mysql process listening, then you have a firewall issue, otherwise you have a mysql configuration issue. You _need_ to see the port "open" in order to be able to connect to.
in flag
`filtered` indicates a firewall.
us flag
You should not open MySQL port to the public internet for security reasons. Use SSH port forwarding instead.
ondravirag avatar
us flag
@Dominix netstat -pnlt|grep mysql tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1577/mysqld
dominix avatar
gf flag
you certainly have a firewall issue. Maybe look for nftables based firewall.
in flag
The firewall does not necessarily have to be on the host itself.
co flag
@vidarlo OP's post on Ask Ubuntu is closed because it's offtopic there.
cn flag
Try drawing a network diagram of how users connect to the database. There may be other network devices between them and the server.
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.