This demo describes how to connect to GreptimeDB using MySQL protocol, on WasmEdge. It utilizes the mysql_async_wasi crate, which is derived from mysql_async.
You can install WasmEdge with:
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s
And create your own GreptimeDB instance on GreptimeCloud, or use self-hosted version.
You can compile and run the examples using the following commands:
cargo build
wasmedge --env "DATABASE_URL=mysql://user:passwd@host:4002/dbname" target/wasm32-wasi/debug/greptimedb.wasm