databases/mysql84-{client,server}: Fix MySQL Router plugin loading
MySQL Router fails to start when the configuration contains an
[http_server] section, as generated by mysqlsh:
Error: Loading plugin for config-section '[http_server]' failed:
libmysqlrouter_http_server.so.1: No space available for static
Thread Local Storage
Upstream compiles with -ftls-model=initial-exec, so router libraries
loaded through dlopen(3) have to be placed in the static TLS block.
libmysqlrouter_http_server.so.1 needs 272 bytes and libmysqlharness.so.1
another 32, while rtld reserves 128 bytes for objects loaded later.
The five rest_* plugins depend on http_server and fail along with it.
PR: 298483
Reported by: marko.cupac@mimar.rs
Sponsored by: Netzkommune GmbH
databases/mysql*-server: make the rc script service jail aware
Set a default of net_basic for the service jail options, so mysqld
can use IPv4/IPv6 when it is started in a service jail. The default
can be overridden via rc.conf.
PR: 279672
Sponsored by: Netzkommune GmbH
databases/mysql{80,84,97}-server: Fix build on CPUs without SSE4.2
The crc32 code declares target("sse4.2"), but the _mm_crc32_* intrinsics
require the crc32 feature. With -mno-crc32, as emitted by -march=native
on a CPU without the instruction, sse4.2 no longer implies crc32 and the
build fails. Declare crc32 instead, including the two flatten wrappers that
inline those intrinsics.
PR: 275404
Sponsored by: Netzkommune GmbH
databases/mysql{80,84,97}-server: Add rc script and user for MySQL Router
All three server ports build and install MySQL Router, but it was never
usable out of the box: there is no mysqlrouter user, no rc script, no
configuration directory, and no log, runtime or data directory. The only
trace of an integration was etc/logrotate.d/mysqlrouter, whose
"create 600 mysqlrouter mysqlrouter" refers to an account that no port
creates, so logrotate(8) skipped that entry with an error and exited
non-zero.
Upstream names that account itself: scripts/CMakeLists.txt sets
MYSQLROUTER_USER to "mysqlrouter", the built-in help of mysqlrouter
suggests --user=mysqlrouter, and the systemd unit shipped for Linux runs
the service under it.
Add the user and group, an rc script, and a configuration sample in
etc/mysqlrouter. mysqlrouter does not detach itself, so it runs under
daemon(8), which also writes the PID file that the postrotate script in
etc/logrotate.d/mysqlrouter expects. The runtime, log and data
directories
are created by the rc script, and only when they are missing, so a host
that already runs MySQL Router under a different account keeps working
untouched. This matches the init script in upstream's own packaging.
The service is off by default.
PR: 253245
Sponsored by: Netzkommune GmbH
databases/mysql*-server: Fix plist issue
Move LICENSE.router and README.router from ${PREFIX} to ${DOCSDIR},
where they belong according to hier(7).
PR: 290283
Reported by: se
Sponsored by: Netzkommune GmbH
databases/mysql84-{client,server}: Update to 8.4.11
This release contains the security fixes of the Oracle Critical
Patch Update of July 2026. 31 of the 54 MySQL issues apply to the
8.4 series and to the MySQL Router built from this port.
Changes:
https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-11.html
Security: 10f5d195-90a5-11f1-bc30-3497f65b111b
Sponsored by: Netzkommune GmbH
databases/mysql{84,97}: Install man pages, clean up dependencies
Re-enable installation of the man pages shipped in the source tarball
and register them in pkg-plist, split between the client and server
packages. Same approach as databases/mysql80-client in PR 279234.
Rework the dependencies based on actual linkage: libfido2 is only used
by the client, curl, icu and liblz4 only by the server. Drop libhidapi
entirely, it is a transitive dependency of libfido2.
While here, fix the CONFLICTS_INSTALL pattern of mysql84-client not
matching mysql80-client and update the mysql84 pkg-message.
Sponsored by: Netzkommune GmbH
databases/mysql84-{server|client}: Update to 8.4.9
Bugs Fixed
Fixed an issue relating to Information Schema privileges. (Bug
The SQL parser consumed a large amount of memory when parsing very
large queries with many large IN clauses.
As of this release, the SQL parser's memory management has been
improved. (Bug #105004, Bug #33390851)
Changelog: https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-9.html
Sponsored by: Netzkommune GmbH
databases/mysql84-{server|client}: Update to 8.4.8
Bugs Fixed
InnoDB: Under certain circumstances, when using the que_eval_sql
interface, a race condition could occur. (Bug #118705, Bug #38310595)
Running SET PERSIST on a system variable after an upgrade can result
in duplicate variable entries across different sections in
mysqld-auto.cnf. (Bug #38680162)
Binary log purged before persisted binlog_expire_* options were
loaded. (Bug #38554467)
When 2 of 6 instances in a geographically dispersed InnoDB Cluster
lost connectivity, the primary server became unresponsive, causing the
COMMIT and INSERT operations to become unresponsive as well. (Bug
mysqldump's --order-by-primary option sorted data by every index on
the table, instead of just sorting by the primary key. (Bug #38284832)
Fixed several issues relating to Thread Pool blocking connections
from closing. (Bug #38170188, Bug #36782728, Bug #38549372)
GTID gaps were generated because of the replica- skip-errors option.
(Bug #28590993)
If server was started on Windows platforms with --skip-grant-tables,
privileges were not checked and remote connections were not permitted.
As a result, the server might not start. (Bug #118805, Bug #38328780)
PR: 292705
Sponsored by: Netzkommune GmbH
databases/mysql84-server: fix build with clang and libc++ 19
As noted in the libc++ 19 release notes [1], std::char_traits<> is now
only provided for char, char8_t, char16_t, char32_t and wchar_t, and any
instantiation for other types will fail.
This causes databases/mysql84-server to fail to compile with clang 19
and libc++ 19, resulting in errors similar to:
/usr/include/c++/v1/string:820:42: error: implicit instantiation of
undefined template 'std::char_traits<unsigned char>'
820 | static_assert(is_same<_CharT, typename
traits_type::char_type>::value,
| ^
/wrkdirs/usr/ports/databases/mysql84-client/work/mysql-8.4.2/sql/rpl_log_encryption.h:821:14:
note: in instantiation of template class 'std::basic_string<unsigned
char>' requested here
821 | Key_string m_encrypted_password;
| ^
/usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared
here
23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
| ^
`Key_string` is defined as `std::basic_string<unsigned char>`, which is
no longer possible. So redefine it as a `std::vector<unsigned char>`
instead.
This requires only a few small adjustments in other places: replacing
the `length()` method with the equivalent `size()` method, and adjusting
the arguments for the `assign()` method, which for `std::vector` takes a
begin and end iterator, instead of a begin iterator and a size.
Another issue is that clang 19 now implements CWG 96 [2], which requires
a template argument list after a 'template' keyword, resulting in errors
similar to:
/wrkdirs/usr/ports/databases/mysql84-client/work/mysql-8.4.2/libs/mysql/serialization/archive.h:84:43:
error: a template argument list is expected after a name prefixed by the
template keyword [-Wmissing-template-arg-list-after-template-kw]
84 | return Archive_derived_type::template
get_size(std::forward<Type>(arg));
| ^
/wrkdirs/usr/ports/databases/mysql84-client/work/mysql-8.4.2/libs/mysql/serialization/archive.h:91:43:
error: a template argument list is expected after a name prefixed by the
template keyword [-Wmissing-template-arg-list-after-template-kw]
91 | return Archive_derived_type::template
get_size_written();
| ^
This requires a number of adjustments to various template invocations.
[1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals
[2] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96
PR: 280695
Sponsored by: Netzkommune GmbH
databases/mysql84-{server|client}: add new Ports
Welcome MySQL 8.4
What is new in MySQL8.4 since MySQL 8.0:
https://dev.mysql.com/doc/refman/8.4/en/mysql-nutshell.html
HINT: MySQL8.2+ supports only 64-bit platforms!!!
special thanks for the majority of the work on this port: samm aka Alex
S.