A promise-based utility to wait for a MySQL database to become available (version 1.1.2). It connects to the specified MySQL host and port, accepting user and password, and resolves once the connection succeeds, or rejects after a configurable timeout. Ideal for scripts that need to ensure the database is up before proceeding. Uses standard `mysql` package underneath. Minimal API: one function with an options object.
npm install mysql-waitNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to a MySQL database and resolves when the database becomes available, or rejects after timeout.
Set a reasonable timeout (default 60s) shorter if immediate feedback is needed.
Ensure credentials are valid before using this tool; error message may not be specific.
Consider migrating to a more modern MySQL wait utility built on mysql2.
Correct: import wait from 'mysql-wait' or const wait = require('mysql-wait')Provide a valid password in options.password.
Start MySQL service or check host/port configuration.