MySQL database driver for the db-migrate migration framework. Version 3.0.0 supports MySQL connections and schema changes. Released under MIT license. This driver allows db-migrate to manage MySQL database migrations, compatible with mysql and mysql2 clients. Differentiating from direct MySQL client usage, it integrates with db-migrate's migration management system, providing up/down migrations, seeding, and CLI support.
npm install db-migrate-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize db-migrate with MySQL driver and run all pending migrations.
Update configuration to use mysql2 driver: 'driver: "mysql2"' and install mysql2 package.
Refactor to async/await: `await instance.up();`
Always include `host: process.env.MYSQL_HOST || 'localhost'` in config.
Grant necessary privileges: `GRANT ALL ON db.* TO 'user'@'host';`
Ensure your code uses bluebird-compatible chaining if mixing .then() with other libraries.
npm install db-migrate-mysql
Check MYSQL_USER and MYSQL_PASSWORD environment variables or config options.
Ensure getInstance() called with valid config including driver: 'mysql'.
Create the database first: `CREATE DATABASE test;`