Ansible playbook code for connecting remote MYSQL db

Hi
I am a novice to ansible and slowly making my hand dirty out of it. I am trying out a usecase where I need to connect to a remote mysql dbserver from my ansible controller machine and execute some queries against that DB. I would like to know if there is any customized ansible playbook available to try with?

Appreciate this help!

Thanks
Saravanan

Use this task locally:
https://docs.ansible.com/ansible/latest/collections/community/mysql/mysql_query_module.html