Score:0

Ubuntu 20.04 myslq-server-8 mysqld fails with any other than bind-address = 0.0.0.0

th flag

As per subject. I wanted to limit the servers listening to local lan in 192.168.1.0/29 by bind-address = 192.168.1.1,192.168.1.2,192.168.1.3

but this always leads to

"Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)"

As I understood, one should be able to limit the accepted addresses by a list?

Andrew Henle avatar
ph flag
Do you notice anything in particular that's different between `192.168.1.1`, `192.168.1.2`, `192.168.1.3` and the value `/var/run/mysqld/mysqld.sock` that you are apparently trying to connect to?
th flag
@andrewe-henle Not sure what you are after here... How to check the value of the socket? Now that I have the bind address on the 0.0.0.0: sudo find / -type s | grep sql I get: /run/mysqld/mysqld.sock /run/mysqld/mysqlx.sock
Score:0
th flag

I fixed it by putting bind_address=0.0.0.0 , but limiting connections to mysql port from local net only by firewall rules:

sudo ufw allow from 192.168.1.0/24 to any port 3306

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.