A CLI tool to extract MySQL database schemas into JSON or SQL files, supporting tables, stored procedures, seed data, and patches. Current version 1.0.2, with moderate release cadence (no recent updates). Key differentiators: generates dependency-ordered SQL files, supports external connection files, and offers options for debug mode and procedure ISV inclusion. Alternatives like mysqldump are more comprehensive but this tool provides lighter, scriptable schema extraction.
npm install extract-mysql-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a config file and runs the CLI to extract schema as JSON or SQL files.
Create a .js or .json config file with { connection: { host, user, password, database } }.Always specify --configFile <path>.
Consider alternatives like mysqldump or mysql-export for ongoing support.
Use environment variables or a secure secret manager, and avoid committing config files.
Run 'npm install mysql' in the project or install globally with 'npm install -g extract-mysql-schema'.
Ensure the path is correct and the file exists; use an absolute path or './relative'.
Ensure config exports an object with { connection: { host, user, password, database } }.Check hostname and network connectivity; ensure MySQL server is running and accessible.