Bug #101469 skip_name_resolve does not take effect
Submitted: 5 Nov 2020 4:53 Modified: 5 Nov 2020 5:46
Reporter: phoenix Zhang (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:8.0.21, 8.0.22, 5.7.32 OS:Any
Assigned to: CPU Architecture:Any

[5 Nov 2020 4:53] phoenix Zhang
Description:
when set skip_name_resolve=0 in my.cnf, it does not take effect

How to repeat:
# cat my_skip_name_resolve.cnf 
[mysqld]
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data_skip_name_resolve
socket=/usr/local/mysql/data_skip_name_resolve/mysql.sock

skip_name_resolve=0

port = 3333
log-bin=                    server-binary-log
relay-log=                  server-relay-log
binlog-checksum=            NONE
enforce-gtid-consistency
gtid-mode=                  on  
report-host=                127.0.0.1
report-user=                root
master-retry-count=         10  
skip-slave-start

# ./bin/mysqld --defaults-file=my_skip_name_resolve.cnf --user=mysql --initialize-insecure
# ./bin/mysqld_safe --defaults-file=my_skip_name_resolve.cnf --user=mysql &
# mysql -uroot -h127.0.0.1 -P3333 
ERROR 1130 (HY000): Host '127.0.0.1' is not allowed to connect to this MySQL server
# mysql -uroot -P3333 --socket=/usr/local/mysql/data_skip_name_resolve/mysql.sock
mysql> show variables like 'skip_name_resolve';
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| skip_name_resolve | ON    |
+-------------------+-------+
1 row in set (0.01 sec)
[5 Nov 2020 5:46] MySQL Verification Team
Hello phoenix Zhang!

Thank you for the report and test case.
Verified as described with 8.0.22 build.

regards,
Umes