can connect mysql through ip but not localhost

hi all,

i have setup a ubuntu box with ngix and php-fpm, when i test install wordpress , it seem like i can't use localhost to connect the database, i need to use 127.0.0.1 in order to complete the wordpress setup.

is there something i need to tweak on /etc/hosts ?

1 Reply

your /etc/hosts should have

127.0.0.1 localhost

in it.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct