{"id":43432,"library":"node-mysql-admin","title":"node-mysql-admin","description":"Node MySQL Admin provides a web-based MySQL database management interface (similar to phpMyAdmin) for Express and Koa applications. Version 0.1.8 is the latest but appears to be in maintenance mode with no recent updates. It requires a MySQL server and does not support Windows. Unlike more modern solutions (e.g., Adminer or phpMyAdmin), this package is tightly coupled to Express middleware and requires passing the app instance. The project has low adoption and may have security concerns due to direct database access and lack of authentication middleware. Not recommended for production.","status":"maintenance","version":"0.1.8","language":"javascript","source_language":"en","source_url":"https://github.com/stanzhai/node-mysql-admin","tags":["javascript","express","koa","mysql","middleware","admin","mysql admin","myAdmin","databases"],"install":[{"cmd":"npm install node-mysql-admin","lang":"bash","label":"npm"},{"cmd":"yarn add node-mysql-admin","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-mysql-admin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as a peer dependency; the middleware expects an Express app instance passed as argument.","package":"express","optional":true},{"reason":"MySQL database driver; used to connect and query the MySQL server.","package":"mysql","optional":false}],"imports":[{"note":"Package uses CommonJS and does not support ES modules. Only require() works.","wrong":"import mysqlAdmin from 'node-mysql-admin';","symbol":"default","correct":"const mysqlAdmin = require('node-mysql-admin');"},{"note":"The middleware factory expects the Express app itself as the first argument to set up routes correctly.","wrong":"app.use(mysqlAdmin());","symbol":"app.use","correct":"app.use(mysqlAdmin(app));"},{"note":"Koa users must wrap Express middleware manually; direct Koa usage is not supported.","wrong":"const Koa = require('koa'); Koa().use(mysqlAdmin(Koa()));","symbol":"Koa integration","correct":"const expressApp = express(); expressApp.use(mysqlAdmin(expressApp)); app.use(function(ctx, next) { /* manual routing */ });"}],"quickstart":{"code":"const express = require('express');\nconst mysqlAdmin = require('node-mysql-admin');\nconst app = express();\napp.use(mysqlAdmin(app));\napp.listen(3000, () => console.log('Navigate to http://localhost:3000/myadmin'));","lang":"javascript","description":"Shows minimal Express setup with node-mysql-admin middleware. Access the admin interface at /myadmin endpoint."},"warnings":[{"fix":"Use a different MySQL admin tool on Windows (e.g., phpMyAdmin, Adminer).","message":"node-mysql-admin does not support Windows. Attempting to install or run on Windows will fail.","severity":"breaking","affected_versions":"<=0.1.8"},{"fix":"Ensure you call `mysqlAdmin(app)` with the app variable, not just `mysqlAdmin()`.","message":"The middleware requires the Express app instance as the first argument to mysqlAdmin().","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Consider switching to actively maintained alternatives like 'mysql2' with a custom admin interface or phpMyAdmin.","message":"The package has not been updated since 2018 and likely contains unpatched vulnerabilities.","severity":"deprecated","affected_versions":"all"},{"fix":"Follow the Koa integration example in the README: create an Express app, add middleware, and route to expressApp manually.","message":"Using with Koa requires manual Express sub-application routing; the package does not natively support Koa.","severity":"gotcha","affected_versions":"all"},{"fix":"Install mysql (or mysql2) separately: npm install mysql","message":"The mysql dependency is mandatory; without it the require fails at runtime.","severity":"breaking","affected_versions":"all"},{"fix":"Use HTTPS and restrict access with Express middleware (e.g., basic-auth) to protect the /myadmin route.","message":"Login page exposes MySQL credentials; no built-in encryption or session management beyond basic login.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.1.8':26 'access':87 'admin':4,7,56,102,104 'adopt':77 'app':71 'appear':31 'applic':24 'authent':91 'base':12 'concern':82 'coupl':63 'databas':14,86,106 'direct':85 'due':83 'e.g':55 'express':21,65,98 'instanc':72 'interfac':16 'javascript':97 'koa':23,99 'lack':89 'latest':29 'low':76 'mainten':35 'manag':15 'may':79 'middlewar':66,92,101 'mode':36 'modern':53 'myadmin':105 'mysql':3,6,13,44,100,103 'node':2,5 'node-mysql-admin':1 'packag':60 'pass':69 'phpmyadmin':19,58 'product':96 'project':74 'provid':8 'recent':39 'recommend':94 'requir':42,68 'secur':81 'server':45 'similar':17 'solut':54 'support':49 'tight':62 'unlik':51 'updat':40 'version':25 'web':11 'web-bas':10 'window':50","created_at":"2026-06-05T16:59:46.454770+00:00","updated_at":"2026-06-05T16:59:46.454770+00:00","problems":[{"fix":"Run `npm install mysql` in your project.","cause":"Missing peer dependency mysql.","error":"Cannot find module 'mysql'"},{"fix":"Use `const mysqlAdmin = require('node-mysql-admin');` instead of import.","cause":"Incorrect import style (e.g., using ES import with a CJS module).","error":"TypeError: mysqlAdmin is not a function"},{"fix":"Use a different port or kill the process occupying port 3000.","cause":"Port already in use by another process.","error":"Error: listen EADDRINUSE :::3000"},{"fix":"Create an Express sub-app and route /myadmin to it as shown in the README.","cause":"Trying to use node-mysql-admin as Koa middleware without Express wrapper.","error":"Koa: node-mysql-admin does not work directly on Koa"}],"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/stanzhai/node-mysql-admin#readme","github":"https://github.com/stanzhai/node-mysql-admin","docs":null,"changelog":null,"pypi":null,"npm":"node-mysql-admin","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}}