{"id":43351,"library":"mysql-server-5.7-lin-x64","title":"mysql-server-5.7-lin-x64","description":"Provides a self-contained MySQL Server 5.7 binary for Debian Linux (x86_64) that can be spawned as a child process from Node.js applications, primarily for testing or local development environments. Version 1.0.0 is the latest stable release. This package is designed to run inside Docker images based on `FROM node:10` (Debian 9) and avoids the need to install MySQL separately. Key differentiator: it bundles the MySQL server binary and provides a convenient JavaScript API to start/stop an instance with custom configuration, but only one instance may be spawned per process. Note that the package is a fork of an older OS X version and has not been updated since 2018, so it may have compatibility issues with newer Node.js versions or operating systems.","status":"deprecated","version":"1.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","local","mysql","server","binary","log"],"install":[{"cmd":"npm install mysql-server-5.7-lin-x64","lang":"bash","label":"npm"},{"cmd":"yarn add mysql-server-5.7-lin-x64","lang":"bash","label":"yarn"},{"cmd":"pnpm add mysql-server-5.7-lin-x64","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package only supports CommonJS require. ESM imports will fail.","wrong":"import startMysql from 'mysql-server-5.7-lin-x64';","symbol":"startMysql","correct":"var startMysql = require('mysql-server-5.7-lin-x64');"}],"quickstart":{"code":"const startMysql = require('mysql-server-5.7-lin-x64');\n\nconst mysqld = startMysql({\n  port: 3307,\n  basedir: __dirname,\n  datadir: __dirname + '/data'\n}, {\n  reinitialize: false\n});\n\nmysqld.stdout.on('data', (data) => {\n  console.log('stdout:', data.toString());\n});\n\nmysqld.stderr.on('data', (data) => {\n  console.error('stderr:', data.toString());\n});\n\nmysqld.on('close', (code) => {\n  console.log('child process exited with code ' + code);\n});\n\nsetTimeout(() => {\n  mysqld.stop();\n  console.log('Server stopped.');\n}, 5000);","lang":"javascript","description":"Shows how to start a MySQL server instance with custom port and data directory, then stop it after 5 seconds."},"warnings":[{"fix":"Use official MySQL Docker image or install MySQL natively for compatibility with modern environments.","message":"Package only supports Node.js 10 on Debian 9. It may not work on newer Node.js versions or other Linux distributions.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Migrate to a maintained MySQL server package or use Docker mysql:8.0 image.","message":"The package has not been updated since 2018 and the underlying MySQL 5.7 is reaching end of life. Consider using MySQL 8.0 or later.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use correct require: require('mysql-server-5.7-lin-x64');","message":"The require path in the README example uses 'mysql-server-5.6-lin-x64' but the package is named 'mysql-server-5.7-lin-x64'. Using the wrong require will fail.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Design your application to use a single server instance, or use separate processes for multiple instances.","message":"Only one MySQL instance can be spawned per Node.js process. Attempting to start a second instance will cause a conflict.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.0':41 '10':60 '2018':120 '5.7':4,15 '64':21 '9':62 'api':84 'applic':32 'avoid':64 'base':56 'binari':16,78,138 'bundl':74 'child':28 'compat':125 'configur':91 'contain':12 'conveni':82 'custom':90 'debian':18,61 'design':50 'develop':38 'differenti':72 'docker':54 'environ':39 'fork':107 'imag':55 'insid':53 'instal':68 'instanc':88,95 'issu':126 'javascript':83,134 'key':71 'latest':44 'lin':6 'lin-x64':5 'linux':19 'local':37,135 'log':139 'may':96,123 'mysql':2,13,69,76,136 'mysql-serv':1 'need':66 'newer':128 'node':59 'node.js':31,129 'note':101 'older':110 'one':94 'oper':132 'os':111 'packag':48,104 'per':99 'primarili':33 'process':29,100 'provid':8,80 'releas':46 'run':52 'self':11 'self-contain':10 'separ':70 'server':3,14,77,137 'sinc':119 'spawn':25,98 'stabl':45 'start/stop':86 'system':133 'test':35 'updat':118 'version':40,113,130 'x':112 'x64':7 'x86':20","created_at":"2026-06-05T16:59:23.151697+00:00","updated_at":"2026-06-05T16:59:23.151697+00:00","problems":[{"fix":"Run 'npm install mysql-server-5.7-lin-x64' and ensure the require path matches the package name exactly.","cause":"The package is not installed, or the require path is incorrect.","error":"Error: Cannot find module 'mysql-server-5.7-lin-x64'"},{"fix":"Start the server with a different port: startMysql({ port: 3307 });","cause":"Another MySQL server or process is already using port 3306.","error":"Error: listen EADDRINUSE :::3306"},{"fix":"Ensure you are running on Debian 9 with x86_64 architecture (e.g., Docker node:10 image).","cause":"Binary not found due to missing native dependencies or incorrect platform (not Debian x86_64).","error":"Error: spawn /path/to/node_modules/mysql-server-5.7-lin-x64/mysqld ENOENT"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://gitlab.com/taylorgoolsby/mysql-server-5.7-lin-x64#readme","github":null,"docs":null,"changelog":null,"pypi":null,"npm":"mysql-server-5.7-lin-x64","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}