All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Security
Security
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

Hyperdrive - Hyperdrive introduces support for MySQL and MySQL-compatible databases

1y ago

Source

CloudflareHyperdrive - Hyperdrive introduces support for MySQL and MySQL-compatible databasescloudflare.com
Snippet from the RSS feed
Hyperdrive now supports connecting to MySQL and MySQL-compatible databases, including Amazon RDS and Aurora MySQL, Google Cloud SQL for MySQL, Azure Database for MySQL, PlanetScale and MariaDB. Hyperdrive makes your regional, MySQL databases fast when connecting from Cloudflare Workers. It eliminates unnecessary network roundtrips during connection setup, pools database connections globally, and can cache query results to provide the fastest possible response times. Best of all, you can connect using your existing drivers, ORMs, and query builders with Hyperdrive's secure credentials, no code changes required. import { createConnection } from "mysql2/promise" ; export interface Env { HYPERDRIVE : Hyperdrive ; } export default { async fetch ( request , env , ctx ) : Promise < Response > { const connection = await createConnection ( { host : env . HYPERDRIVE . host , user : env . HYPERDRIVE . user , password : env . HYPERDRIVE . password , database : env . HYPERDRIVE . database , port : env . HYPERDRIVE . port , disableEval : true , // Required for Workers compatibility } ) ; const [ results , fields ] = await connection . query ( "SHOW tables;" ) ; ctx . waitUntil ( connection . end ()) ; return new Response ( JSON . stringify ( { results , fields } ) , { headers : { "Content-Type" : "application/json" , "Access-Control-Allow-Origin" : "*" , }, } ) ; }, } satisfies ExportedHandler < Env >; Learn more about how Hyperdrive works and get started building Workers that connect to MySQL with Hyperdrive .

You might also wanna read

Rethinking Database Architecture for the SSD Era: Beyond Spinning Disk Constraints

The article explores how traditional relational databases (like Postgres, MySQL, SQLite) were designed for spinning disk era hardware and ex

brooker.co.za·6mo ago

OctaneDB: High-Performance Python Vector Database Library for AI/ML Applications

OctaneDB is a high-performance, lightweight vector database library built in Python that claims to provide 10x faster performance than exist

github.com·10mo ago

Snowflake, Databricks, and Azure Ship Postgres-Compatible Databases with Custom Storage Engines

Three major cloud data platforms — Snowflake, Databricks, and Microsoft Azure — have all recently shipped Postgres-compatible databases with

thebuild.com·1mo ago

AWS Launches ExtendDB: Open Source DynamoDB-Compatible Adapter with PostgreSQL Backend Support

AWS has announced ExtendDB, an open-source DynamoDB-compatible adapter that allows developers to use the DynamoDB API with alternative stora

infoq.com·27d ago

Technical Discussion: Distributed SQL Engine Requirements for Ultra-Wide Tables in ML and Multi-Omics Data

A technical discussion about the limitations of current SQL databases and data processing systems when handling ultra-wide tables with thous

news.ycombinator.com·5mo ago

AWS launches Graviton-powered Redshift RG instances with up to 7x faster query performance

AWS has launched new Redshift RG instances powered by its Graviton processors, claiming up to 7x faster query performance for data warehouse

theregister.com·1mo ago

Comments

Sign in to join the conversation.

No comments yet. Be the first.