I'm trying to figure out why mysql uses Unix socket (/tmp/mysql.sock) by default, instead of normal TCP/IP sockets.
It doesn't seem like a security thing, as you can listen only on 127.0.0.1 which should be equally safe (socket file is world-writable, so you don't get Unix accounts based protection).
And surely all operating systems rely on high performance TCP/IP so much that it cannot be significantly slower than Unix sockets - Linux does all sort of zero-copy tricks even for network traffic, so it surely must be fast for loopback.
So is there any legitimate reason for using Unix sockets here, or is it just some weird historical accident?