Easily modify MySQL database data with easy functions. Current stable version is 1.3.2. Provides a simplified API with Promise support and events like connected, dataModification, tableCreate/Delete/Clear/Rename. Methods include set, get, push, pull, add, subtract, exists, clear, delete, and base_set/base_get for encrypted rows. Key differentiator is the event system mirroring library actions. Last updated in 2022, release cadence unknown. Not actively maintained since 2022.
npm install mysql-databaseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connect to MySQL, set and get a key-value pair, then close connection.
Check for null or use exists() before get().
Use library methods to modify data if event tracking is needed.
Consider migrating to 'mysql2' and using a more maintained wrapper like 'typeorm' or 'knex'.
Upgrade to >=1.2.8 or use lowercase table names.
Create an instance first: const db = new MySQL(); then db.connect(...).
Create the database manually: CREATE DATABASE my_database;
Ensure MySQL server is running and host/port are correct.