Bind-address not working in /etc/my.cnf

ristodesign

Verified User
Joined
Jan 13, 2019
Messages
5
Hi all,

Somehow I cannot get mysqld to listen on ip 0.0.0.0 (now 127.0.0.1), whatever I do with the bind-address in /etc/my.cnf.
Near this mysqld is also not available as tcp6 service.

I'm on Centos7 with Custombuild 2, mariadb 10.4.
 
Just commented out the bind-address=0.0.0.0 and rebooted, somewhere I read that it could force mysql to ipv6 :::3306, but sadly no change. Still listening on tcp(4) 127.0.0.1. So we cannot connect externally on port 3306.
 
Maybe you need to use spaces in the line. Try this:
Code:
bind-address = *
next to that, check if you got a /etc/my.cnf.d directory. If yes, check it's contents like server.cnf (or maybe others) which might overrule your setting.
After that, restart mariadb.
Just to be complete, check if port 3306 is opened on your firewall.
 
Hi Richard, it's exactly as you answered, inside the /etc/my.cnf.d directory I found a server.cnf which forced it to 127.0.0.1.

Thanks a bunch!(y)
 
Back
Top