Bug #86863 thread pool spams error log on connection failure.
Submitted: 29 Jun 2017 6:31 Modified: 12 Jan 2018 19:29
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.6.36, 5.7.18 OS:Any
Assigned to: CPU Architecture:Any
Tags: regression, thread pool

[29 Jun 2017 6:31] Shane Bester
Description:
When invalid user/host tries to connect to mysql with thread pool plugin, we get too much spam in the logs.

With thread pool:
-----------------
[Warning] Hostname 'i7' does not resolve to '192.168.1.107'.
[Note] Hostname 'i7' has the following IP addresses:
[Note]  - 127.0.0.1
[ERROR] Failed to prepare connection
[Warning] Failed to create thd and authenticate connection
[Warning] Failed to process connection event
[ERROR] Failed to prepare connection
[Warning] Failed to create thd and authenticate connection
[Warning] Failed to process connection event
[Note] Access denied for user 'root'@'localhost' (using password: YES)
[ERROR] Failed to prepare connection
[Warning] Failed to create thd and authenticate connection
[Warning] Failed to process connection event

Without thread pool:
-------------------
[Warning] Hostname 'i7' does not resolve to '192.168.1.107'.
[Note] Hostname 'i7' has the following IP addresses:
[Note]  - 127.0.0.1
[Note] Access denied for user 'root'@'localhost' (using password: YES)

How to repeat:
here was my test:

E:\mysql-5.7.17-winx64\bin>mysql -uroot -h192.168.1.107
ERROR 1130 (HY000): Host '192.168.1.107' is not allowed to connect to this MySQL server

E:\mysql-5.7.17-winx64\bin>mysql -uroot -h192.168.1.107
ERROR 1130 (HY000): Host '192.168.1.107' is not allowed to connect to this MySQL server

E:\mysql-5.7.17-winx64\bin>mysql -uroot -p12345
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Suggested fix:
lowering log_warnings is not an option because logging misses vital info then.
please reduce the thread pool's output to at most one informative line per event.
[26 Oct 2017 14:24] Aidan McCarthy
The issue also occurs in MySQL 5.6.37.

Is there any workaround apart from disabling log_warnings variable?
[26 Oct 2017 15:11] MySQL Verification Team
One workaround is to disable the thread pool plugin..
[12 Jan 2018 19:29] Paul DuBois
Posted by developer:
 
Fixed in 5.5.60, 5.6.40, 5.7.22, 8.0.5, 9.0.0.

The thread pool plugin logged too much information for failed connections.
[25 Apr 2018 18:37] MySQL Verification Team
Now https://bugs.mysql.com/bug.php?id=90618 has been filed on 5.7.22