A professional Electron-based MySQL database management application with advanced features for viewing, editing, and managing multiple MySQL databases simultaneously.
- Multi-Database Support - Connect to multiple MySQL databases simultaneously
- Advanced SQL Editor - Monaco Editor with syntax highlighting, autocomplete, and IntelliSense
- Data Grid - AG Grid with inline editing, sorting, filtering, and pagination
- Schema Explorer - Browse tables, views, procedures, functions, and triggers
- Auto-Refresh - Automatically refresh query results at configurable intervals
- Dark/Light Mode - Automatic theme switching based on system preference
- SQL syntax highlighting and formatting
- Table and column autocomplete
- Execute entire query or selected text
- Query history tracking
- Multi-tab support (planned)
- Inline cell editing
- Add/delete rows
- Column filtering and sorting
- Copy data (selected rows or all)
- Export to JSON, CSV, XLSX
- Virtual scrolling for large datasets
- View all tables with row counts
- Browse table structure
- View indexes and foreign keys
- Context menu for common operations
- Quick table data preview
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher) - Download
- npm (comes with Node.js)
- MySQL databases accessible via localhost or SSH tunnels
git clone https://github.com/bulgariamitko/mysql-manager.git
cd mysql-managernpm installCopy the example environment file:
cp .env.example .envEdit .env and add your database configurations:
# Database 1
DB1_NAME=Production
DB1_HOST=127.0.0.1
DB1_PORT=3306
DB1_USER=your_username
DB1_PASSWORD=your_password
DB1_DATABASE=your_database
# Database 2
DB2_NAME=Staging
DB2_HOST=127.0.0.1
DB2_PORT=3307
DB2_USER=your_username
DB2_PASSWORD=your_password
DB2_DATABASE=your_database
# Add more databases (DB3, DB4, etc.) as needed#, $, &, *, (, ), [, ], {, }, etc.), wrap it in double quotes:
DB1_PASSWORD="my}P@ss#word!"See .env.example for a complete list of special characters that require quoting.
npm run devThe application will:
- Start the Vite development server
- Launch the Electron application
- Test database connections
- Open DevTools automatically
The application supports up to 10 databases (DB1 through DB10). Each database requires:
| Variable | Required | Default | Description |
|---|---|---|---|
DB{N}_NAME |
Yes | - | Display name for database |
DB{N}_HOST |
No | 127.0.0.1 | Database host |
DB{N}_PORT |
No | 3306 | Database port |
DB{N}_USER |
No | root | MySQL username |
DB{N}_PASSWORD |
No | (empty) | MySQL password |
DB{N}_DATABASE |
No | Same as NAME | Database name |
Note: {N} can be 1 through 10 (DB1, DB2, DB3, etc.)
If your databases are remote, set up SSH tunnels first:
# Create SSH tunnel
ssh -L 3307:localhost:3306 [email protected]
# Or run in background
ssh -L 3307:localhost:3306 -f -N [email protected]Then configure your .env to use the tunnel port:
DB1_PORT=3307npm run buildThis creates:
- Optimized React bundle in
dist/ - Packaged Electron app in
release/
npm run build:macCreates a .dmg installer and .app bundle for macOS.
mysql-manager/
βββ src/
β βββ main/ # Electron main process
β β βββ index.js # Main entry point
β β βββ preload.js # Preload script
β β βββ database/ # Database logic
β β βββ connection-pool.js
β β βββ query-executor.js
β βββ renderer/ # React UI
β β βββ App.jsx # Main app component
β β βββ components/ # React components
β β βββ index.jsx # React entry point
β βββ shared/ # Shared code
β βββ database-config.js
βββ .env # Database credentials (gitignored)
βββ .env.example # Example configuration
βββ package.json
βββ vite.config.js
npm run dev- Start in development modenpm run build- Build for productionnpm run build:mac- Build macOS installernpm start- Start production build
Problem: β Connection failed errors
Solutions:
-
Verify SSH tunnels are running (if using remote databases):
lsof -i :3307 # Check if port is in use -
Test database connection manually:
mysql -h 127.0.0.1 -P 3307 -u your_user -p
-
Check
.envfile for typos in credentials -
Ensure passwords with special characters are quoted
Problem: Electron app doesn't launch
Solutions:
-
Clear node_modules and reinstall:
rm -rf node_modules package-lock.json npm install
-
Check Node.js version:
node --version # Should be v18+ -
Look for errors in terminal output
Problem: Error: listen EADDRINUSE: address already in use :::5173
Solutions:
-
Kill the process using port 5173:
lsof -ti:5173 | xargs kill -9
-
Or change the Vite port in
vite.config.js
- Never commit
.envfiles - Always use.env.examplefor documentation - Use SSH tunnels for remote database access instead of exposing ports
- Rotate credentials regularly - Especially for production databases
- Limit database permissions - Create read-only users when possible
- Use strong passwords - Minimum 16 characters with mixed case, numbers, and symbols
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
If you encounter issues:
- Check the Troubleshooting section
- Search existing issues
- Create a new issue with:
- Environment details (OS, Node version)
- Error messages
- Steps to reproduce
For detailed setup instructions, see SETUP.md.
Give a βοΈ if this project helped you!
Built with: