Summary: | databases/mariadb105-server fails to resolve localhost | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | John R <gamer> |
Component: | Individual Port(s) | Assignee: | Bernard Spil <brnrd> |
Status: | Closed Works As Intended | ||
Severity: | Affects Many People | CC: | brnrd, freebsd, gamer, jason, zarychtam |
Priority: | --- | Flags: | linimon:
maintainer-feedback?
(brnrd) |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
John R
2021-04-10 16:18:03 UTC
Is MariaDB client supposed to connect to localhost instead of file socket? Is MariaDB server listening on localhost is the socket not firewalled? What is localhost address/addresses in your case ? I see the issue on *-server, regardless of whether the localhost is 127.0.0.1 or 127.0.1.1 or 1127.0.2.1 etc. (In reply to John R from comment #2) localhost usually resolves to ::1. Are you sure that IPv6 is supported in your install ? I don't use ipv6 and I never mentioned it. Could you please describe it better? How can one reproduce your issue? If I have a website running that requires backend connection to the db, it fails to connect when the ipaddress is set up as localhost, however when I change it to the numeric ip, it connects. That better? :) I believe it's not a bug. Please consider closing this PR and checking/editing the contents of /etc/hosts or/and enabling connections and required grants on [::1]:3306 socket. What exactly should I have in /etc/hosts ? At the moment it is like this... #::1 localhost localhost.my.domain 127.0.0.1 hostname.domain.co.uk BuildBSD localhost localhost.domain.co.uk Host and domain obfuscated. Also I had grants for user@localhost and user@127.0.0.1 added too. Made no difference till I changed localhosts to 127.0.0.1 on the website connection details. Additionally, mariadb provides resolveip which I used to confirm it did see localhost as the expected 127.0.0.1, still failed to connect. This is expected behavior of MySQL and MariaDB. When the hostname is equal to "localhost", the protocol uses UNIX Sockets rather than TCP Sockets. While the linked document is for MySQL 8.0, this has been the norm throughout the MySQL/MariaDB 5.x days and still in MariaDB 10.x. This is basically a legacy "feature" in MySQL that has never been changed. https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-connection-socket.html Mind sharing with us in a documented form the intent? I am unable to get mariadb beyond to respond to anything except the mariadb client. All the other comments went unresponded to, the developer is unwilling to document the intent. |