{"repo":"cloudflare/worker-template-mysql","free":true,"listed":false,"github":"https://github.com/cloudflare/worker-template-mysql","clone":"git clone https://github.com/cloudflare/worker-template-mysql.git","description":"Reference demo and modified MySQL driver to connect Cloudflare Workers to a relational database.","language":"JavaScript","stars":60,"topics":["mysql","sql","database","cloudflare","serverless","workers"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Cloudflare Workers + MySQL This repo contains example code and a MySQL driver that can be used in any Workers project. If you are interested in using the driver outside of this template, copy the driver/mysql module into your project's node modules or directly alongside your source. Usage Before you start, please refer to the official tutorial . Please Note: - you must use this config object format vs. a database connection string - the hostname property must be the URL to your Cloudflare Tunnel, NOT your database host - your Tunnel will be configured to connect to your database host Running the MySQL Demo mysql/docker-compose.yml This docker-compose composition will get you up and running with a local instance of mysql and a copy of cloudflared to enable your applications to securely connect through an encrypted tunnel. Unlike the PostgreSQL example, this does not contain any server-side connection pool, but you can configure one behind cloudflared should it be necessary. Usage from within scripts/mysql , run: 1. Create credentials file (first time only) 2. Start a local dev stack (cloudflared/mysql)","default_branch":null,"files":null,"tree":[],"storefront":"/r/cloudflare","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cloudflare/worker-template-mysql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}