Registry / database / dbgate-plugin-mysql

dbgate-plugin-mysql

JSON →
library7.1.13jsnpmunverified

MySQL database connectivity plugin for DbGate, a universal SQL client. This plugin enables DbGate to connect to MySQL databases, providing features like schema browsing, query execution, and data management. Version 7.1.13 is current, with releases following DbGate updates. Key differentiators: built-in to DbGate, automatically installed with DbGate, no separate configuration needed.

npm install dbgate-plugin-mysql
INSTALL
IMPORT
SIG · DBGATE-PLUGIN-MYSQ
D
dbgate-plugin-mysql
databasejavascriptv7.1.13
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dbgateApi
import { dbgateApi } from 'dbgate-api';
const dbgateApi = require('dbgate-api');
DbGate plugins use ESM imports inside DbGate environment.
pluginContext
import { pluginContext } from 'dbgate-api';
import pluginContext from 'dbgate-plugin-mysql';
pluginContext is provided by dbgate-api, not this plugin.
PluginClass
export default class MyPlugin { constructor(api) { this.api = api; } }
export class MyPlugin { }; module.exports = MyPlugin;
Plugin must be default export as class, not named export and not using CommonJS.

Demonstrates that dbgate-plugin-mysql is automatically used by DbGate for MySQL connections. No manual plugin code required.

// This plugin is built into DbGate and does not require manual import. // To use MySQL connections in DbGate, simply install DbGate and connect to a MySQL database. // Example connection object (used in DbGate's connection configuration): const connectionConfig = { host: process.env.MYSQL_HOST ?? 'localhost', port: 3306, user: process.env.MYSQL_USER ?? 'root', password: process.env.MYSQL_PASSWORD ?? '', database: process.env.MYSQL_DATABASE ?? 'test' }; // DbGate will use the mysql plugin automatically when creating a connection of type 'mysql'. // No code changes needed. console.log('MySQL plugin ready.');
Debug
Known issues
gotchaThis plugin is built into DbGate and should not be installed separately via npm. Doing so may cause version conflicts.
fix
Uninstall the package globally or locally if manually installed; rely on the built-in plugin within DbGate.
affects: >=5.0
deprecatedPlugin API version 1 is deprecated; plugins should use version 2 API from dbgate-api.
fix
Update your plugin to use dbgate-api v2 patterns.
affects: >=7.0
gotchaThe plugin does not support connecting over SSH tunnels directly; use DbGate's connection configuration for SSH.
fix
Configure SSH in DbGate connection settings rather than trying to pass options to the plugin.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'dbgate-api'
Missing dbgate-api dependency when developing a plugin outside DbGate.
fix
Run 'npm install dbgate-api' or ensure you are developing inside DbGate's environment.
TypeError: pluginContext is not a function
Trying to use pluginContext from the wrong import.
fix
Import pluginContext from 'dbgate-api' rather than from this plugin.
Error: Plugin 'mysql' already registered
Attempting to manually register the built-in mysql plugin twice.
fix
Remove any manual registration of dbgate-plugin-mysql; it is auto-registered by DbGate.
Upgrade
Version history
7.1.13latest on npm
Audit
Dependencies
dbgate-apirequiredProvides core DbGate API for plugin integration
mysql2requiredMySQL client library for database connections
Agent activity
6 hits · last 30 days
node
6
Resources
dbgate-plugin-mysql — npm install dbgate-plugin-mysql · libregistry