MySQL database adapter for Koishi, the cross-platform chatbot framework. Current stable version is 1.2.0, following Koishi core releases. Provides full CRUD operations for user data, group data, and message storage using MySQL. Unlike SQLite, offers better concurrency and scalability for production bots. Ships TypeScript types.
npm install koishi-database-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a Koishi bot with MySQL database adapter.
Update koishi-core to ^1.12.0
Use connectionString: 'mysql://user:pass@host:port/db'
Set poolSize option in createMysqlDatabase() to higher value
npm install koishi-core@^1.12.0
import { createMysqlDatabase } from 'koishi-database-mysql'Check MYSQL_USER and MYSQL_PASSWORD environment variables