MySQL2 SQL File Importer
JSON →mysql2-import, currently at version 5.0.22, is a Node.js library specifically designed for importing `.sql` dump files into a MySQL database. It's an adaptation of the `mysql-import` project, updated to seamlessly integrate with the `mysql2` driver. This integration leverages `mysql2`'s enhanced performance and modern features, including prepared statements, which are crucial for secure and efficient database interactions. The library provides an intuitive API for connecting to a database, specifying multiple `.sql` files or directories containing dumps, and executing their commands asynchronously. A key differentiator introduced in version 5.0 is its robust event system, featuring `onProgress` and `onDumpCompleted` callbacks. These allow developers to monitor the import process in real-time, receiving updates on bytes processed and file completion status, making it highly suitable for handling large SQL datasets. While no explicit release cadence is documented, it generally aligns with the versioning of its upstream `mysql-import` project, delivering stable and feature-rich releases.
Traffic · last 30 days ↓60% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany