{"id":43354,"library":"mysql-server-8-osx-x64","title":"MySQL Server 8 OSX x64 Binary","description":"A Node.js package that provides a binary distribution of MySQL Server 8 for macOS x86 64-bit systems, allowing developers to spawn a MySQL server instance under the current user within an application directory. Version 100.1.24 is the current stable release, forked from mysql-server-5.6-osx-x64. It is platform-specific (OSX x64) and intended for local development environments. The package offers a simple API to start and stop the server, with configurable options. Only one instance can be spawned per application. Key differentiators: no system-wide installation required, runs user-scoped, and includes stop() method. Release cadence is infrequent.","status":"active","version":"100.1.24","language":"javascript","source_language":"en","source_url":"https://github.com/taylorgoolsby/mysql-server-5.7-osx-x64","tags":["javascript","local","mysql","server","binary","log"],"install":[{"cmd":"npm install mysql-server-8-osx-x64","lang":"bash","label":"npm"},{"cmd":"yarn add mysql-server-8-osx-x64","lang":"bash","label":"yarn"},{"cmd":"pnpm add mysql-server-8-osx-x64","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package uses CommonJS module system; no default ES module export.","wrong":"import startMysql from 'mysql-server-8-osx-x64';","symbol":"startMysql","correct":"const startMysql = require('mysql-server-8-osx-x64');"},{"note":"For TypeScript with CommonJS, use import = require pattern.","wrong":"import * as startMysql from 'mysql-server-8-osx-x64';","symbol":"startMysql","correct":"import startMysql = require('mysql-server-8-osx-x64');"},{"note":"The package exports a single function, not an object with named properties.","wrong":"const { startMysql } = require('mysql-server-8-osx-x64');","symbol":"startMysql","correct":"const startMysql = require('mysql-server-8-osx-x64');"}],"quickstart":{"code":"// Install: npm install mysql-server-8-osx-x64\n\nconst startMysql = require('mysql-server-8-osx-x64');\n\n// Start a MySQL server on port 3307\nconst mysqld = startMysql({ port: 3307 }, { reinitialize: false });\n\nmysqld.stdout.on('data', (data) => {\n  console.log('stdout: ' + data);\n});\n\nmysqld.stderr.on('data', (data) => {\n  console.log('stderr: ' + data);\n});\n\nmysqld.on('close', (code) => {\n  console.log('child process exited with code ' + code);\n});\n\n// Later, stop the server\nmysqld.stop();","lang":"javascript","description":"Demonstrates how to spawn a MySQL server instance with custom port, listen to stdout/stderr, and stop the server."},"warnings":[{"fix":"Ensure you stop the previous server (mysqld.stop()) before starting a new one, or design your application to use a single instance.","message":"Only one instance of MySQL server can be spawned per application process. Attempting to start multiple instances will result in an error.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use an alternative MySQL package for your platform (e.g., mysql-server for Linux or Windows).","message":"The package is platform-specific: it only works on macOS x86 64-bit. Installing on other OS or architectures will fail or produce a non-functional server.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Make sure the application user has write access to the data directory (defaults to './mysql-data' relative to cwd).","message":"The server runs under the current user, not as a system service. Ensure MySQL data directory permissions are correct to avoid write errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Double-check the package name and install exactly with 'npm install mysql-server-8-osx-x64'. Verify node_modules contains the correct module.","message":"The package name and versioning may have inconsistencies: package name is 'mysql-server-8-osx-x64' but version is 100.1.24 (not following semver). Importing via require('mysql-server-8-osx-x64') may break if package is not installed correctly.","severity":"breaking","affected_versions":"100.x"},{"fix":"Consider using a more actively maintained MySQL Node.js library like 'mysql2' combined with a system-installed MySQL server, or a Docker container.","message":"The package is a fork of older versions (5.6, 5.7) and may not receive updates for newer MySQL 8 versions or security patches.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'100.1.24':42 '5.6':53 '64':22 '8':3,18 'allow':25 'api':75 'applic':39,92 'binari':6,13,117 'bit':23 'cadenc':110 'configur':83 'current':35,45 'develop':26,68 'differenti':94 'directori':40 'distribut':14 'environ':69 'fork':48 'includ':106 'infrequ':112 'instal':99 'instanc':32,87 'intend':65 'javascript':113 'key':93 'local':67,114 'log':118 'maco':20 'method':108 'mysql':1,16,30,51,115 'mysql-serv':50 'node.js':8 'offer':72 'one':86 'option':84 'osx':4,55,62 'osx-x64':54 'packag':9,71 'per':91 'platform':60 'platform-specif':59 'provid':11 'releas':47,109 'requir':100 'run':101 'scope':104 'server':2,17,31,52,81,116 'simpl':74 'spawn':28,90 'specif':61 'stabl':46 'start':77 'stop':79,107 'system':24,97 'system-wid':96 'user':36,103 'user-scop':102 'version':41 'wide':98 'within':37 'x64':5,56,63 'x86':21","created_at":"2026-06-05T16:59:23.722294+00:00","updated_at":"2026-06-05T16:59:23.722294+00:00","problems":[{"fix":"Reinstall the package: npm install mysql-server-8-osx-x64 (ensure on macOS x64). If the error persists, check node_modules/mysql-server-8-osx-x64/bin for the mysqld binary.","cause":"The MySQL binary (from the package) is missing or not executable, possibly due to incomplete installation or incompatible platform.","error":"Error: spawn ENOENT"},{"fix":"Call mysqld.stop() on the existing instance before starting a new one.","cause":"Attempted to start a second MySQL instance without stopping the first one.","error":"Can't start server: only one instance allowed per application"},{"fix":"Run npm install mysql-server-8-osx-x64 --save","cause":"The package is not installed in node_modules.","error":"Module not found: Can't resolve 'mysql-server-8-osx-x64'"},{"fix":"Start the server with a different port, e.g., startMysql({ port: 3307 })","cause":"The default port 3306 is already occupied by another MySQL service or application.","error":"Error: listen EADDRINUSE :::3306"}],"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://github.com/taylorgoolsby/mysql-server-5.7-osx-x64#readme","github":"https://github.com/taylorgoolsby/mysql-server-5.7-osx-x64","docs":null,"changelog":null,"pypi":null,"npm":"mysql-server-8-osx-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}}