php/php-src — pull request #275 by asannes (2013-02-10 11:14:24+00:00)
Title: Add mysqlnd.localhost_override option.

When localhost is encoundtered in mysqlnd, it is overriden by /tmp/mysql.sock or socket_option.

Many distributions have their own custom patches to have a correct default for their distribution. This pull request adds mysqlnd.localhost_override ini option to configure it from their configuration options.

The implementation is straightforward and it is backward compatible, if you do not set it the behaviour is as it used to be.

A side effect is that you can use remote hosts as the override (tcp://ip:port). Many applications use localhost as the default host, and it would be nice if it was easier to configure it to use alternative hosts.

Another case that would also benefit is where a host goes from having mysql on the localhost to a seperate host.