未经身份验证的用户在MYSQL中的含义是什么?

时间:2009-06-11 20:14:52

标签: mysql

mysql> show full processlist;
+-----+----------------------+--------------------+------+---------+------+----------------------------------+-----------------------+
| Id  | User                 | Host               | db   | Command | Time | State                            | Info                  |
+-----+----------------------+--------------------+------+---------+------+----------------------------------+-----------------------+
|   1 | system user          |                    | NULL | Connect |  623 | Waiting for master to send event | NULL                  | 
|   2 | system user          |                    | NULL | Connect |    0 | Reading event from the relay log | NULL                  | 
| 400 | root                 | localhost          | v3   | Sleep   |   68 |                                  | NULL                  | 
| 585 | root                 | localhost          | v3   | Query   |    0 | NULL                             | show full processlist | 
| 748 | unauthenticated user | 172.19.0.27:32833  | NULL | Connect | NULL | login                            | NULL                  | 
| 749 | unauthenticated user | 172.19.0.27:32836  | NULL | Connect | NULL | login                            | NULL                  | 
| 750 | unauthenticated user | 172.19.0.27:32838  | NULL | Connect | NULL | login                            | NULL                  | 
| 751 | unauthenticated user | 172.19.0.27:32841  | NULL | Connect | NULL | login                            | NULL                  | 
| 752 | unauthenticated user | 172.19.0.27:32844  | NULL | Connect | NULL | login                            | NULL                  | 
| 753 | unauthenticated user | 172.19.0.27:32846  | NULL | Connect | NULL | login                            | NULL                  | 
| 754 | unauthenticated user | 172.19.0.27:32848  | NULL | Connect | NULL | login                            | NULL                  | 
| 755 | unauthenticated user | 172.19.0.139:46827 | NULL | Connect | NULL | login                            | NULL                  | 
| 756 | unauthenticated user | 172.19.0.139:46830 | NULL | Connect | NULL | login                            | NULL                  | 
| 757 | unauthenticated user | 172.19.0.139:46831 | NULL | Connect | NULL | login                            | NULL                  | 
| 758 | unauthenticated user | 172.19.0.27:32857  | NULL | Connect | NULL | login                            | NULL                  | 
| 759 | unauthenticated user | 172.19.0.27:32858  | NULL | Connect | NULL | login                            | NULL                  | 
| 760 | unauthenticated user | 172.19.0.27:32859  | NULL | Connect | NULL | login                            | NULL                  | 
| 761 | unauthenticated user | 172.19.0.27:32863  | NULL | Connect | NULL | login                            | NULL                  | 
| 762 | unauthenticated user | 172.19.0.27:32864  | NULL | Connect | NULL | login                            | NULL                  | 
| 763 | unauthenticated user | 172.19.0.27:32866  | NULL | Connect | NULL | login                            | NULL                  | 
| 764 | unauthenticated user | 172.19.0.27:32870  | NULL | Connect | NULL | login                            | NULL                  | 
| 765 | unauthenticated user | 172.19.0.27:32871  | NULL | Connect | NULL | login                            | NULL                  | 
| 766 | unauthenticated user | 172.19.0.139:46833 | NULL | Connect | NULL | login                            | NULL                  | 
| 767 | unauthenticated user | 172.19.0.27:32878  | NULL | Connect | NULL | login                            | NULL                  | 
| 768 | unauthenticated user | 172.19.0.27:32881  | NULL | Connect | NULL | login                            | NULL                  | 
| 769 | unauthenticated user | 172.19.0.27:32885  | NULL | Connect | NULL | login                            | NULL                  | 
| 770 | unauthenticated user | 172.19.0.139:46835 | NULL | Connect | NULL | login                            | NULL                  | 
| 771 | unauthenticated user | 172.19.0.27:32888  | NULL | Connect | NULL | login                            | NULL                  | 
| 772 | unauthenticated user | 172.19.0.27:32890  | NULL | Connect | NULL | login                            | NULL                  | 
| 773 | unauthenticated user | 172.19.0.139:46837 | NULL | Connect | NULL | login                            | NULL                  | 
| 774 | unauthenticated user | 172.19.0.139:46839 | NULL | Connect | NULL | login                            | NULL                  | 
| 775 | unauthenticated user | 172.19.0.139:46841 | NULL | Connect | NULL | login                            | NULL                  | 
| 776 | unauthenticated user | 172.19.0.139:46844 | NULL | Connect | NULL | login                            | NULL                  | 
| 777 | unauthenticated user | 172.19.0.139:46845 | NULL | Connect | NULL | login                            | NULL                  | 
| 778 | unauthenticated user | 172.19.0.139:46847 | NULL | Connect | NULL | login                            | NULL                  | 
| 779 | unauthenticated user | 172.19.0.27:32898  | NULL | Connect | NULL | login                            | NULL                  | 
| 780 | unauthenticated user | 172.19.0.27:32900  | NULL | Connect | NULL | login                            | NULL                  | 
| 781 | unauthenticated user | 172.19.0.139:46850 | NULL | Connect | NULL | login                            | NULL                  | 
| 782 | unauthenticated user | 172.19.0.139:46852 | NULL | Connect | NULL | login                            | NULL                  | 
| 783 | unauthenticated user | 172.19.0.139:46854 | NULL | Connect | NULL | login                            | NULL                  | 
| 784 | unauthenticated user | 172.19.0.139:46857 | NULL | Connect | NULL | login                            | NULL                  | 
| 785 | unauthenticated user | 172.19.0.139:46859 | NULL | Connect | NULL | login                            | NULL                  | 
| 786 | unauthenticated user | 172.19.0.27:32903  | NULL | Connect | NULL | login                            | NULL                  | 
| 787 | unauthenticated user | 172.19.0.139:46862 | NULL | Connect | NULL | login                            | NULL                  | 
| 788 | unauthenticated user | 172.19.0.139:46865 | NULL | Connect | NULL | login                            | NULL                  | 
| 789 | unauthenticated user | 172.19.0.139:46866 | NULL | Connect | NULL | login                            | NULL                  | 
| 790 | unauthenticated user | 172.19.0.139:46868 | NULL | Connect | NULL | login                            | NULL                  | 
| 791 | unauthenticated user | 172.19.0.139:46871 | NULL | Connect | NULL | login                            | NULL                  | 
| 792 | unauthenticated user | 172.19.0.139:46873 | NULL | Connect | NULL | login                            | NULL                  | 
| 793 | unauthenticated user | 172.19.0.27:32907  | NULL | Connect | NULL | login                            | NULL                  | 
| 794 | unauthenticated user | 172.19.0.27:32909  | NULL | Connect | NULL | login                            | NULL                  | 
| 795 | unauthenticated user | 172.19.0.27:32911  | NULL | Connect | NULL | login                            | NULL                  | 
| 796 | unauthenticated user | 172.19.0.139:46875 | NULL | Connect | NULL | login                            | NULL                  | 
| 797 | unauthenticated user | 172.19.0.27:32914  | NULL | Connect | NULL | login                            | NULL                  | 
| 798 | unauthenticated user | 172.19.0.27:32916  | NULL | Connect | NULL | login                            | NULL                  | 
| 799 | unauthenticated user | 172.19.0.139:46877 | NULL | Connect | NULL | login                            | NULL                  | 
| 800 | unauthenticated user | 172.19.0.139:46879 | NULL | Connect | NULL | login                            | NULL                  | 
+-----+----------------------+--------------------+------+---------+------+----------------------------------+-----------------------+
57 rows in set (0.00 sec)

6 个答案:

答案 0 :(得分:28)

“用户”列中与“未经身份验证的用户”的连接已启动连接但尚未发送他/她的凭据,因此服务器无法确切知道谁正在连接。

如果此类连接仅在经过身份验证时显示在列表中,则可能会从可用套接字中运行服务器,您甚至不知道原因。

大多数情况下卡住的连接都归因于DNS not resolving properly, which the skip-name-resolve option will help with

Pythian博客上的

More info

答案 1 :(得分:5)

您可能需要使用skip-name-resolve,因为mysql正在尝试解析mysql主机地址,或者在文件/ etc / hosts中添加要连接的主机名,或者两者都添加。奖励:修复您的DNS导致查找超时的任何问题

答案 2 :(得分:1)

你有一个低thread_cache_size(mysql启动线程数)或max_connexion而mysql无法让新线程在创建新线程来处理这些连接

答案 3 :(得分:1)

我们的生产数据库遇到了这个问题。事实证明,在与数据库的连接上是SSL。由于网络流量很大(Django没有连接池),我们打开了很多与数据库的连接 - 猜测服务器因初始SSL握手而陷入困境。当我们关闭SSL到数据库时,事情就开始了。

答案 4 :(得分:0)

确实, skip-name-resolve 可以解决您的问题但不是我的情况。

此消息:"未经身份验证的用户"在用户列上显示" show processlist"可能意味着您使用的是旧加密密码。

就我而言,我使用新的加密格式重新创建了用户,如:

CREATE USER 'myuser'@'IP' IDENTIFIED BY PASSWORD '*DA7CC43A56959FE78FC336FB9D7185AAACCC44DD';
如果您没有使用过旧密码,那么只需使用它即可。在你的配置中。

CREATE USER 'myuser'@'IP' IDENTIFIED BY 'mypassword';

答案 5 :(得分:-1)

我在 my.cnf 中添加了 skip_name_resolve = 1,解决了我的问题。