Revert "Should not change localhost to '127.0.0.1'"

This reverts commit 87c9782291a186136f9b18a3e17db7bafdfb02c8.
Our test on some systems shows that using "localhost" would cause
connection problems, so we have to force using tcp to connect to mysql.