use 127.0.0.1 instead of localhost for db host parameter

localhost means connect via socket, which is in some cases not available
or wrong configured or differs from the place php assumes it.
Merge pull request #109 from Flyingmana/patch-6

use 127.0.0.1 instead of localhost for db host parameter