I'm running MySQL 5.6 on 64-bit Windows 7 with IPv6 and IPv4 enabled.
In my.ini:
port=3306
bind-address = ::1
I was hoping to use IPv6 and restrict to the loop-back adapter. I used ::1
instead of 127.0.0.1
because win7 with IPv6 defaults to ::1
for localhost
.
With this configuration netstat reports the following:
C:\>netstat -an |findstr 3306
TCP 0.0.0.0:3306 0.0.0.0:0 LISTENING
TCP [::1]:3306 [::]:0 LISTENING
It seems like connections may be getting blocked on the IPv4 interface, but seeing netstat report that 0.0.0.0
port 3306
is open makes me uneasy.
The MySQL documentation specifies:
If the address is a “regular” IPv4 or IPv6 address (such as 127.0.0.1 or ::1), the server accepts TCP/IP connections only for that IPv4 or IPv6 address.
TCPView gave me the same info as netstat. I couldn't get TDIMon working on my system.
How can I prevent mysql from listening on 0.0.0.0
?