[Bug 295854] databases/php8[2-5]-pdo_mysql: unable to build with /var/run/mysql/mysql.sock default

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 04 Jun 2026 18:39:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295854

            Bug ID: 295854
           Summary: databases/php8[2-5]-pdo_mysql: unable to build with
                    /var/run/mysql/mysql.sock default
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: bofh@freebsd.org
          Reporter: fabian@wenks.ch
             Flags: maintainer-feedback?(bofh@freebsd.org)
          Assignee: bofh@freebsd.org

Since MariaDB 10.6 the default socket has changed from /tmp/mysql.sock to
/var/run/mysql/mysql.sock. It would be nice if databases/php8[2-5]-pdo_mysql
would also be able to be built with this new path.

Discussion started with bug #267835 in November 2022, but just recently in bug
#267835 comment 17 I got encouraged to try to look again into this. I have
tried a few things, but so far I was unable to build databases/php84-pdo_mysql
with the new default path to /var/run/mysql/mysql.sock default. As Marcos Mello
thinks it seems that the two ports databases/php84-pdo_mysql and
databases/php84-mysqli may need to be built together and not as individual
ports. I at least was able to build databases/php84-mysqli with the new default
path, but it failed for the binaries and libraries in lang/php84, www/mod_php84
and databases/php84-pdo_mysql.

I will not repeat the whole long details / outputs here, as everything is
available starting at bug #267835 comment 18. Hopefully someone with more
FreeBSD Ports, and especially PHP ports related know-how is able to come up
with a solution for this.

As a workaround in /usr/local/etc/php.ini the option 'pdo_mysql.default_socket
= /var/run/mysql/mysql.sock' needs to be set, or else MariaDB 10.6+ may be
reverted in /usr/local/etc/mysql/my.cnf with the "old" default path in the
[client-server] section with 'socket = /tmp/mysql.socket'.

-- 
You are receiving this mail because:
You are the assignee for the bug.