You cannot connect to the underlying MySQL database for your WordPress instance and do not have the resources or permissions to write a cloud function.
Fivetran suggest two complimentary recommendations:
Configure a Fivetran webhook connector:
- Configure webhooks to be triggered by WordPress and pushed to the Fivetran endpoint you will have been provided with upon the configuration of the connector
- Export the database tables in a supported file format and utilise a Fivetran file connector to import that data
Finally, transform that data in whatever state your data is required to land in in order to provide a view of historic and incremental data.
As an open source community, WordPress offers a number of extensions that facilitate the export of data to a cloud storage bucket (such as Amazon S3).