Registry / database / repair-mysql

repair-mysql

JSON →
library0.0.5jsnpmunverified

Utility to repair, move, or import old MySQL databases from a non-working MySQL server by copying the data folder and using the dbsake tool to re-import into a new MySQL instance. Version 0.0.5, last updated circa 2018, targets Node 8.x. Useful for recovery when the old server is broken, or for migrations and backups. Limited to that specific workflow and not actively maintained.

npm install repair-mysql
INSTALL
IMPORT
SIG · REPAIR-MYSQL
R
repair-mysql
databasejavascriptv0.0.5
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.

config
const config = require('./config.json');
import config from './config.json';
CJS only; ES imports not supported in Node 8.x
repair-mysql
const repair = require('repair-mysql');
import repair from 'repair-mysql';
Package has no main export; it's a CLI tool, not a library. Use as a script.
spawn
const { spawn } = require('child_process');
import { spawn } from 'child_process';
Internal usage, but shows the pattern for CJS.

Configuration for repair-mysql. Set source and target MySQL data folders, connection credentials, and dbsake path, then run the script.

const config = require('./config.json'); // Edit config.json with your paths: // { // "oldFolder": "/var/lib/mysql-old", // "newFolder": "/var/lib/mysql-new", // "host": "127.0.0.1", // "user": "root", // "password": "yourpassword", // "port": 3306, // "mysqlUser": "mysql", // "workingFolder": "/opt/dbsake" // } // Then run: npm start
Debug
Known issues
breakingRequires Node.js 8.x; not compatible with modern Node versions due to EOL and missing APIs.
fix
Use Node 8.x or consider alternatives like mysqlfrm or manual .frm parsing.
affects: >=0.0.0
gotchaRequires external tool dbsake. Not bundled; must be installed separately.
fix
Install dbsake: `curl -s http://get.dbsake.net > dbsake && chmod u+x dbsake`
affects: >=0.0.0
deprecatedPackage abandoned since 2018; no updates for new MySQL versions or security patches.
fix
Use modern migration tools like mysqlpump, mysqldump, or Percona XtraBackup.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'repair-mysql'
Package not installed or used as a CLI without npm link.
fix
Run `npm install repair-mysql` in your project directory and use `npm start` from that directory.
dbsake: command not found
dbsake not installed or not in PATH.
fix
Install dbsake in the workingFolder specified in config and ensure it's executable.
Upgrade
Version history
0.0.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Meta
1
Resources
repair-mysql — npm install repair-mysql · libregistry