Bug #113978 Set admin_port in port being used does not throw error
Submitted: 13 Feb 18:38 Modified: 14 Feb 9:24
Reporter: Vinicius Malvestio Grippa Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:8.0.35, 8.0.36 OS:Any
Assigned to: CPU Architecture:Any

[13 Feb 18:38] Vinicius Malvestio Grippa
Description:
Setting the admin_port on a used port does not throw errors despite failing to be used. 

Another problem is that it is show in the variables:

mysql> show global variables like '%port%';
+--------------------------+-------------+
| Variable_name            | Value       |
+--------------------------+-------------+
| admin_port               | 21145       |
| large_files_support      | ON          |
| mysqlx_port              | 18031       |
| mysqlx_port_open_timeout | 0           |
| port                     | 45000       |
| report_host              | single-8031 |
| report_password          |             |
| report_port              | 8031        |
| report_user              |             |
| require_secure_transport | OFF         |
+--------------------------+-------------+
10 rows in set (0.01 sec)

If I try to change standard port to a busy port:

2024-02-13T18:30:37.807124Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: Address already in use
2024-02-13T18:30:37.807144Z 0 [ERROR] [MY-010257] [Server] Do you already have another mysqld server running on port: 21145 ?

How to repeat:
Set admin_port to a busy port.

Suggested fix:
Throw an error similar to the error when setting the standard port.
[14 Feb 9:24] MySQL Verification Team
Hello Vinicius,

Thank you for report and feedback.
Verified as described.

regards,
Umesh