LEMP ready , just a tiny problem

hi all,

i have setup my linode with LEMP ( linux, nginx, mysql ,php) + php-fpm, now everything is running smoothly, but i have a small problem ,i can't connect mysql through "localhost",i can only connect mysql with ip , which is 127.0.0.1 , did i miss out any config ?

1 Reply

Disabled local socket access (mysqld.sock) in my.cnf, or put the socket in an unusual location, other than rest of the suite and/or PHP binding expects it to reside.

Look for socket= line in /etc/mysql/my.cnf, in ALL the sections (so, [client], [mysqld], [mysqld_safe]).

Also, ps axu | grep mysqld and look for –socket parameter on the commandline.

Proper location of the socket for Debian (and derivatives?) is /var/run/mysqld/mysqld.sock, dunno where it is on other distros.

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