hi @AnuragSharma-MSFT , The above query is not correct. Please find the correct query and correct me if any. If there is any failed connection like wrong password , it tries to connect to the db with CONNECT and there wont be any DISCONNECT for that connection so i made this query and worked for me.
let startdt=datetime(6/21/2021, 0:00:00.000 PM);
let enddt=datetime(6/22/2021, 0:00:00.000 PM);
let x=
(AzureDiagnostics
| where ResourceProvider =="MICROSOFT.DBFORMYSQL"
and Category == 'MySqlAuditLogs' and event_class_s == "connection_log" and ( event_subclass_s == 'CONNECT')
and TimeGenerated > startdt and TimeGenerated < enddt
| project TimeGenerated, event_class_s, event_subclass_s, user_s , ip_s , connection_id_d, db_s
);
let y=
(AzureDiagnostics
| where ResourceProvider =="MICROSOFT.DBFORMYSQL"
and Category == 'MySqlAuditLogs' and event_class_s == "connection_log" and ( event_subclass_s == 'DISCONNECT')
and TimeGenerated > startdt and TimeGenerated < enddt
| project TimeGenerated, event_class_s, event_subclass_s, user_s , ip_s , connection_id_d, db_s
);
x | join kind=leftanti y on connection_id_d | order by connection_id_d