Registry / database / mysql-server-8-win-x64

mysql-server-8-win-x64

JSON →
library1.1.3jsnpmunverified

Package that downloads and spawns a MySQL Server 8 binary for Windows 64-bit. Current stable version is 1.1.3. Provides a function to start a MySQL server instance with optional configuration, returning a ChildProcess with a stop() method. Only one instance per application. Requires Git LFS for download. Limited to Windows x64. Not actively maintained; last update 2017.

npm install mysql-server-8-win-x64
INSTALL
IMPORT
SIG · MYSQL-SERVER-8-WIN
M
mysql-server-8-win-x64
databasejavascriptv1.1.3
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.

startMysql
var startMysql = require('mysql-server-8-win-x64');
import startMysql from 'mysql-server-8-win-x64';
Package uses CommonJS; no default export. ESM import will fail.
startMysql
const startMysql = require('mysql-server-8-win-x64');
const startMysql = require('mysql-server-8-win-x64').default;
No .default property; the required function is directly exported.
startMysql
var startMysql = require('mysql-server-5.7-win-x64');
var startMysql = require('mysql-server-5.6-win-x64');
Version mismatch: package name in require may need to match installed version.

Install and run MySQL Server 8 on Windows x64, then stop after 5 seconds.

var startMysql = require('mysql-server-8-win-x64'); var mysqld = startMysql({ port: 3307 }, { reinitialize: false }); mysqld.stdout.on('data', function(data) { console.log('stdout: ' + data); }); mysqld.stderr.on('data', function(data) { console.log('stderr: ' + data); }); mysqld.on('close', function(code) { console.log('child process exited with code ' + code); }); setTimeout(function() { mysqld.stop(); }, 5000);
Debug
Known issues
gotchaRequires Git LFS: you must install Git LFS before npm install, otherwise the binary download may fail silently.
fix
Install Git LFS from https://git-lfs.github.com/ and run 'git lfs install' before npm install.
affects: >=1.0.0
gotchaOnly one instance per application: calling startMysql twice will cause conflicts.
fix
Ensure only one instance is created; use a singleton pattern or check if already running.
affects: >=1.0.0
gotchaPackage is Windows-only; will not work on macOS or Linux.
fix
Use cross-platform alternatives like mysql2 with a managed MySQL service or Docker.
affects: >=1.0.0
deprecatedThe package provides binaries for MySQL 5.7 and 5.6 but is named mysql-server-8-win-x64, leading to confusion; actual version is 5.7 or 5.6?
fix
Check the binary version printed on startup; consider using official MySQL installer.
affects: 1.1.3
Errors
Common errors & fixes
ENOENT: no such file or directory, stat '<path>\mysql-server-8-win-x64\bin\mysqld.exe'
Git LFS not installed, so binary was not downloaded properly.
fix
Install Git LFS and re-run npm install.
Error: spawn EACCES
Missing execute permissions on the mysqld binary.
fix
Run 'chmod +x node_modules/mysql-server-8-win-x64/bin/mysqld.exe' (if on Windows use icacls or ensure antivirus not blocking).
Error: listen EADDRINUSE :::3306
Port 3306 already in use (maybe another MySQL instance).
fix
Use startMysql({ port: 3307 }) to start on a different port.
Error: Cannot find module 'mysql-server-8-win-x64'
Package not installed or name misspelled in require.
fix
Run 'npm install mysql-server-8-win-x64' and check the package name.
Upgrade
Version history
1.1.3latest on npm
Audit
Dependencies
git-lfsrequiredRequired to download the MySQL binary.
Agent activity
2 hits · last 30 days
node
2
Resources
mysql-server-8-win-x64 — npm install mysql-server-8-win-x64 · libregistry