Bug #111989 Provide Additional Client Information for "Unknown database" error
Submitted: 7 Aug 2023 16:56 Modified: 8 Aug 2023 6:15
Reporter: Yakir Gibraltar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Logging Severity:S4 (Feature request)
Version:8.1.0 OS:Any
Assigned to: CPU Architecture:Any

[7 Aug 2023 16:56] Yakir Gibraltar
Description:
Hello MySQL Development Team,

While working with connections to various databases, I have noticed that when attempting to connect to a database with an incorrect name, the system only returns the following error:
[Note] Unknown database 'foo'

While this message is clear, it could be improved by adding more client-specific details to aid in troubleshooting and logging. This could include information such as the username, IP address, and port number used in the connection attempt.

Here's an example of a more descriptive error message:
[Note] Unknown database 'foo'. Connection attempt made by user 'username' from IP 'xxx.xxx.xxx.xxx' on port 'yyyy'.

Including such information would make error handling and tracking more efficient, especially in environments with multiple users and connections.

I believe this improvement would benefit many users of MySQL, and I hope you will consider implementing it in a future update.

Thank you for considering my suggestion, and please let me know if you require any further details or clarification.

Best Regards,
Yakir Gibraltar

How to repeat:
Connect with incorrect database
[8 Aug 2023 6:15] MySQL Verification Team
Hello Yakir,

Thank you for the feature request.

regards,
Umesh