Thank you for reaching out and for posting your question on Microsoft Q&A.
During the occurrence of CPU spikes, troubleshooting can be performed to identify the processes that were active. Additionally, we have a public document available. The below doc should help.
Troubleshoot high CPU utilization in Azure Database for MySQL - Flexible Server
Regards,
Oury