显示[Note]用户'UNKNOWN_MYSQL_USER'的访问被拒绝的MySQL 5.7.17启动日志 [英] MySQL 5.7.17 startup log showing [Note] Access denied for user 'UNKNOWN_MYSQL_USER'
问题描述
我在Centos 6上运行了MySQL Community Server版本5.7.17,所有内容均带有全新安装,Centos 6带有最小"选项安装,MySQL由官方yum repo安装.
I have MySQL Community Server version 5.7.17 running on Centos 6, everything comes with clean install, Centos 6 installed with "minimal" options, MySQL installed by official yum repo.
启动MySQL服务器时,日志"/var/log/mysqld.log"显示为:
When I start MySQL server, the log "/var/log/mysqld.log" showing:
[Note] Access denied for user 'UNKNOWN_MYSQL_USER'@'localhost' (using password: NO)
它出现在日志的最后一行,我试图这样做:
It appears at the last line of the log, I tried to:
mysql> select * from mysql.user;
我只能看到默认情况下附带的"root"和"mysql.sys",我是否可以知道用户'UNKNOWN_MYSQL_USER'@'localhost'是什么? 5.7.17版本中有什么新东西吗?
I can only see "root" and "mysql.sys" which comes by default, may I know what is the user 'UNKNOWN_MYSQL_USER'@'localhost'? is that something new in the version 5.7.17?
谢谢.
推荐答案
没什么可担心的:) 由于某人/某人试图访问MySQL服务器,但连接失败,因此您收到此消息.您可以通过尝试使用错误的用户名和/或密码连接到MySQL并查看错误日志文件来重现此行为.
Nothing to worry about :) You are receiving this message because someone/something tried to access MySQL server, but connection failed. You can reproduce this behaviour by attempting to connect to MySQL with wrong user and/or password and watch the error log file.
在您的情况下,似乎是/etc/init.d/mysqld本身试图测试MySQL服务器是否已启动并正在运行.
In your case, looks like it's the /etc/init.d/mysqld itself trying to test if MySQL server is up and running.
TIMEOUT="$STARTTIMEOUT"
while [ $TIMEOUT -gt 0 ]; do
RESPONSE=`/usr/bin/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1`
默认情况下,在MySQL 5.7中,错误日志的详细程度设置为3(错误,警告和注释),这就是为什么您在错误日志文件中看到此消息的原因.
By default, in MySQL 5.7 the error log verbosity is set to 3 (errors, warnings and notes), this is why you're seeing this message in the error log file.
mysql> show variables like 'log_error_verbosity';
+---------------------+-------+
| Variable_name | Value |
+---------------------+-------+
| log_error_verbosity | 3 |
+---------------------+-------+
这篇关于显示[Note]用户'UNKNOWN_MYSQL_USER'的访问被拒绝的MySQL 5.7.17启动日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!