最新的 Debian 12 更新将 MariaDB 服务器暴露给互联网
4 分•作者: babuskov•3 个月前
我有一些运行 MariaDB 的 Debian 12 服务器。这些服务器配置了 bind-address 127.0.0.1:3306,以确保所有数据库连接都是本地的。
今天我升级到了 Debian 12.15,然后重启并检查了开放端口,以确保所有服务都在运行。
令我惊讶的是,MariaDB 不再监听 127.0.0.1:3306,而是有一个“init”在监听 :::3306。
看起来默认配置已更改为使用 Systemd 套接字。我想这没问题,但悄无声息地让你的数据库服务器可以被整个互联网访问听起来不是个好主意。
所以,只是一个公告,如果你只依赖 bind-address,请确保重新配置 mariadb.socket 设置。
查看原文
I have a couple servers with Debian 12, running MariaDB. The servers were configured with bind-address 127.0.0.1:3306 so that any database connections are local.<p>I upgraded to Debian 12.15 today, rebooted and checked open ports just to see if all services are running.<p>To my surprise, MariaDB is no longer listening on 127.0.0.1:3306, but we have "init" listening on :::3306.<p>It looks like default config has changed to use Systemd sockets. Which I guess is fine, but silently making your database server accessible to the whole Internet doesn't sound like a good idea.<p>So, just PSA, if you rely on bind-address only, make sure you reconfigure the mariadb.socket settings.