Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
mysql-import
Advanced tools
Readme
This is a fork of the node package node-mysql-importer originally created by some European dude. I was using this as a dependency in another project and had a few issues. 1- it logged everything to the console, including my passwords and sensitive info and 2- if there're any semicolons in the datatabse all hell breaks loose. I left an issue on his repo and he promptly deleted (or hid) the repo, so I fixed and will maintain my own copy. Thanks for your work, Mark.
$ npm install --save mysql-import
This is a node module that allows you to load sql queries from a text file and run them against your MySQL database. It supports ECMA6 promises and requires a recent version of NodeJS 5+ to work.
Here is an example of usage. Note that each query in the text file must terminate with a semicolon followed by a newline or the end of the file(;).
const importer = require('mysql-import')
importer.config({
'host': 'localhost',
'user': 'testuser',
'password': 'testpwd',
'database': 'mydb'
})
importer.importSQL('mydb.sql').then( () => {
console.log('all statements have been executed')
}).catch( err => {
console.log(`error: ${err}`)
})
FAQs
Import .sql into a MySQL database with Node.
We found that mysql-import demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).