Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
mysql-backup
Advanced tools
Readme
Create a backup from MySQL. A modern version of mysqldump, but it's not to create a file, to output a string instead.
npm install mysql-backup
const mysqlBackup = require('mysql-backup');
mysqlBackup({
host: 'localhost',
user: 'root',
password: '',
database: 'test',
}).then(dump => {
console.log(dump);
})
var mysqlDump = require('mysqldump');
var fs = require('fs');
mysqlDump({
host: 'localhost',
user: 'root',
password: '',
database: 'test',
tables:['players'], // only these tables
where: {'players': 'id < 1000'}, // Only test players with id < 1000
ifNotExist:true, // Create table if not exist
}.then(dump => {
fs.writeFileSync('test.sql', dump); // Create data.sql file with dump result
})
Type: String
Url to Mysql host. Default: localhost
Type: String
Port to Mysql host. Default: 3306
Type: String
The MySQL user to authenticate as.
Type: String
The password of that MySQL user
Type: String
Name of the database to dump.
Type: Array
Array of tables that you want to backup.
Leave Blank for All. Default: [] ALL
Type: Boolean
Output table structure Default: true
;
Type: Boolean
Output table data for ALL tables Default: true
;
Type: Object
Where clauses to limit dumped data Example: where: {'users': 'id < 1000'}
Combine with data: false
to only dump tables with where clauses Default: null
;
Type: Boolean
Create tables if not exist method Default: true
;
Type: Boolean
Drop tables if exist Default: false
;
Type: Boolean
Return dump as a raw data on callback instead of create file Default: false
;
Type: String
Path to a unix domain socket to connect to. When used host
and port
are ignored.
The MIT License
FAQs
Create a backup from MySQL
The npm package mysql-backup receives a total of 19 weekly downloads. As such, mysql-backup popularity was classified as not popular.
We found that mysql-backup 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.