Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mysqldump

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysqldump

Create a DUMP from MySQL

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12K
decreased by-10.23%
Maintainers
1
Weekly downloads
 
Created
Source

Mysql Dump

npm version Build Status

Create a backup from MySQL

Installation

npm install mysqldump

Example

var mysqlDump = require('mysqldump');

mysqlDump({
	host: 'localhost',
	user: 'root',
	password: '',
	database: 'test',
	dest:'./data.sql' // destination file
},function(err){
	// create data.sql file;
})

Full Options Example :

var mysqlDump = require('mysqldump');

mysqlDump({
	host: 'localhost',
	user: 'root',
	password: '',
	database: 'test',
	tables:['players'], // only these tables 
	ifNotExist:true, // Create table if not exist
	dest:'./data.sql' // destination file
},function(err){
	// create data.sql file;
})

Options

Host

Type: String

Url to Mysql host. Default: localhost

Port

Type: String

Port to Mysql host. Default: 3306

User

Type: String

The MySQL user to authenticate as.

Password

Type: String

The password of that MySQL user

Database

Type: String

Name of the database to dump.

Tables

Type: Array

Array of tables that you want to backup.

Leave Blank for All. Default: [] ALL

Schema

Type: Boolean

Output table structure Default: true;

Data

Type: Boolean

Output table data Default: true;

ifNotExist

Type: Boolean

Create tables if not exist method Default: true;

Dest

Type: String

Output filename with directories Default: './data.sql';

SocketPath

Type: String

Path to a unix domain socket to connect to. When used host and port are ignored.

npm


The MIT License

Keywords

FAQs

Package last updated on 19 May 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc