
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@prisma/adapter-mariadb
Advanced tools
This package contains the driver adapter for Prisma ORM that enables usage of the mariadb
database driver for MariaDB and MySQL databases.
mariadb
is the official MariaDB connector for Node.js, providing high-performance access to MariaDB and MySQL databases. It can be used with any MariaDB or MySQL database that's accessed via TCP, including cloud-hosted instances.
This section explains how you can use it with Prisma ORM and the @prisma/adapter-mariadb
driver adapter. Be sure that the DATABASE_URL
environment variable is set to your MariaDB/MySQL connection string (e.g. in a .env
file).
driverAdapters
Preview feature flagSince driver adapters are currently in Preview, you need to enable its feature flag on the datasource
block in your Prisma schema:
// schema.prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
Once you have added the feature flag to your schema, re-generate Prisma Client:
npx prisma generate
Next, install the MariaDB Prisma ORM driver adapter:
npm install @prisma/adapter-mariadb
import { PrismaMariaDb } from '@prisma/adapter-mariadb'
import { PrismaClient } from '@prisma/client'
const adapter = new PrismaMariaDb({
host: 'localhost', // your database host
user: 'your_username', // your database username
password: 'your_password', // your database password
database: 'your_database', // optional, your database name
})
const prisma = new PrismaClient({ adapter })
We encourage you to create an issue if you find something missing or run into a bug.
If you have any feedback, leave a comment in this GitHub discussion.
FAQs
Prisma's driver adapter for "mariadb"
The npm package @prisma/adapter-mariadb receives a total of 4,582 weekly downloads. As such, @prisma/adapter-mariadb popularity was classified as popular.
We found that @prisma/adapter-mariadb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.