Commit 6fa01105 authored by Alexander Nozdrin's avatar Alexander Nozdrin

Follow-up for Bug#12762885 - 61713: MYSQL WILL NOT BIND TO "LOCALHOST"

IF LOCALHOST IS BOTH IPV4/IPV6 ENABLED.

The original patch removed default value of the bind-address option.
So, the default value became NULL. By coincedence NULL resolves
to 0.0.0.0 and ::, and since the server chooses first IPv4-address, 
0.0.0.0 is choosen. So, there was no change in the behaviour.

This patch restores default value of the bind-address option to "0.0.0.0".
parent 96b62513
...@@ -1841,6 +1841,9 @@ static void network_init(void) ...@@ -1841,6 +1841,9 @@ static void network_init(void)
struct addrinfo *ai, *a; struct addrinfo *ai, *a;
struct addrinfo hints; struct addrinfo hints;
if (!my_bind_addr_str)
my_bind_addr_str= (char *) "0.0.0.0";
sql_print_information("Server hostname (bind-address): '%s'; port: %d", sql_print_information("Server hostname (bind-address): '%s'; port: %d",
my_bind_addr_str, mysqld_port); my_bind_addr_str, mysqld_port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment