最新的 Debian 12 更新将 MariaDB 服务器开放至互联网

4作者: babuskov大约 1 个月前原帖
我有几台运行 Debian 12 的服务器,正在使用 MariaDB。这些服务器的配置是将 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 &quot;init&quot; 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&#x27;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.