![]() Loopback interfaces are generally better tested and it's easier to say another host instead of localhost if you need to spread the load across boxes. Sockets have acl by default (it's a file, so same semantics) whereas loopback has none. Loopback interfaces have a stupid large MTU so there should be no/little fragmentation so the only overhead you have is that the packet still needs to traverse the whole network stack whereas a socket doesn't. Sockets are good if speed really really matters. So I should fix the socket problem I guess. Changing from "localhost" to "127.0.0.1" forced PHP to connect via TCP/IP instead. That broke (perhaps the dir change to "/run/mysql/mysqld.sock"?). PHPmyAdmin and Wordpress) were previously connecting via a UNIX socket. So my problem was likely that there was a problem connecting via a UNIX socket and I've inadvertently worked around that: Localhost has a special meaning for MySQL (and its drivers), rather connecting via lo, it does connect via a Unix socket, if localhost as server is specified. # from your network provider (if any) or from your regional registry (ARIN, Do not try to invent your own network numbers but instead get one # behind a NAT, ADSL router, etc.), you need real official assigned # In case you want to be able to connect directly to the Internet (i.e. # nets which will never be connected to the Internet: # According to RFC 1918, you can use the following IP networks for private # consulted at all see /etc/nf for the resolution order. # In the presence of the domain name service or NIS, this file may not be # This file describes a number of aliases-to-address mappings for the for You may want to check that file, here's a copy of my hosts file (most times peopkle rarely need to modify the file). Typically, 127.0.0.1 is linked to localhost so it would work, however, the link is typically set inside the /etc/hosts file. You think I'm dead, but i sail away, on a wave of mutilation!" "cease to exist, giving my goodbye, drive my car into the ocean, Has anything like that changed recently? Like in the past six months?Ĭlimb up it, kayak down it + make sure it runs on GNU/Linux So editing the appropriate config files restored functionality. Turns out that for both tools I needed to connect to "127.0.0.1" instead of "localhost". I launched phpmyadmin to test the PHP > MYSQL connection and that could not work either. I just had a confusing error with Wordpress that couldn't connect to my database. I've a Gentoo development server that I've not really been keeping on top of! Posted: Mon 3:09 pm Post subject: 127.0.0.1 vs localhost for phpmyadmin and Wordpress Gentoo Forums Forum Index Networking & Security Gentoo Forums :: View topic - 127.0.0.1 vs localhost for phpmyadmin and Wordpressġ27.0.0.1 vs localhost for phpmyadmin and Wordpress
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |