![mysqld[1108] [警告] 中止与 db 的连接 7466:“未连接”用户:“未经身份验证”主机:“127.0.0.1”](https://linux22.com/image/788020/mysqld%5B1108%5D%20%5B%E8%AD%A6%E5%91%8A%5D%20%E4%B8%AD%E6%AD%A2%E4%B8%8E%20db%20%E7%9A%84%E8%BF%9E%E6%8E%A5%207466%EF%BC%9A%E2%80%9C%E6%9C%AA%E8%BF%9E%E6%8E%A5%E2%80%9D%E7%94%A8%E6%88%B7%EF%BC%9A%E2%80%9C%E6%9C%AA%E7%BB%8F%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81%E2%80%9D%E4%B8%BB%E6%9C%BA%EF%BC%9A%E2%80%9C127.0.0.1%E2%80%9D.png)
我正在运行 Ubuntu Server 20.04。这是一个运行 Mariadb 的 LEMP 服务器。当我运行该命令时,sudo service mariadb status
我收到以下警告:
Jul 28 00:18:59 mail.example.com mysqld[1108]: 2023-07-28 0:18:59 7466 [Warning] Aborted connection 7466 to db: 'unconnected' user: 'unauthenticated' host: '127.0.0.1' (This connection closed normally without authentication)
Jul 28 00:18:59 mail.example.com mysqld[1108]: 2023-07-28 0:18:59 7467 [Warning] Aborted connection 7467 to db: 'unconnected' user: 'unauthenticated' host: '127.0.0.1' (This connection closed normally without authentication)
Jul 28 00:18:59 mail.example.com mysqld[1108]: 2023-07-28 0:18:59 7469 [Warning] Aborted connection 7469 to db: 'unconnected' user: 'unauthenticated' host: '127.0.0.1' (This connection closed normally without authentication)
Jul 28 00:18:59 mail.example.com mysqld[1108]: 2023-07-28 0:18:59 7470 [Warning] Aborted connection 7470 to db: 'unconnected' user: 'unauthenticated' host: '127.0.0.1' (This connection closed normally without authentication)
Jul 28 00:18:59 mail.example.com mysqld[1108]: 2023-07-28 0:18:59 7471 [Warning] Aborted connection 7471 to db: 'unconnected' user: 'unauthenticated' host: '127.0.0.1' (This connection closed normally without authentication)
Jul 28 00:18:59 mail.example.com mysqld[1108]: 2023-07-28 0:18:59 7472 [Warning] Aborted connection 7472 to db: 'unconnected' user: 'unauthenticated' host: '127.0.0.1' (This connection closed normally without authentication)
Jul 28 00:18:59 mail.example.com mysqld[1108]: 2023-07-28 0:18:59 7474 [Warning] Aborted connection 7474 to db: 'unconnected' user: 'unauthenticated' host: '127.0.0.1' (This connection closed normally without authentication)
Jul 28 00:18:59 mail.example.com mysqld[1108]: 2023-07-28 0:18:59 7475 [Warning] Aborted connection 7475 to db: 'unconnected' user: 'unauthenticated' host: '127.0.0.1' (This connection closed normally without authentication)
这个警告是什么意思?我该如何调试和修复它?
答案1
有可能sudo service mariadb status
通过打开与 MariaDB 的连接并立即关闭来检查 MariaDB 是否正在运行。MariaDB 发现它很奇怪并将该行为记录为警告。
您可以检查并更新/etc/init.d/mariadb
它status
以检查 pid 和 lsof 的输出(如果检查端口是否实际绑定对您很重要)。