dumptools v1.0.1
DumpTools
A unuseful tool to export and import .sql file with MySQL. If it is unuseful, it is essential. 1. Installation 1. Add MySQL binaries to PATH variable 1. Linux (/bin/sh) 2. Mac OS X (/bin/zsh) 3. Windows 2. Install dumptools 2. Usage 1. Configure 2. Export 3. Import
1. Installation
dumptools can only be used with MySQL and if MySQL is locally installed (127.0.0.1/localhost). Be sure that the mysql and mysqldump command is in your environment variables!
1.1 Add MySQL binaries to PATH variable:
If you didn't add the MySQL binary folder to your PATH, it is not a problem:
1.1.1 Linux (/bin/sh):
shell> cd $HOME
shell> nano .basrhc
Add the following line to the end of the file:
export PATH=/folder/to/mysql/bin/:$PATH
shell> source .bashrc
1.1.2 Mac OS X (/bin/zsh):
shell> cd $HOME
shell> nano .zshrc
Add the following line to the end of the file:
export PATH=/folder/to/mysql/bin/:$PATH
shell> source .zshrc
1.1.3 Windows:
- On the Windows desktop, right-click My Computer.
- In the pop-up menu, click Properties.
- In the System Properties window, click the Advanced tab, and then click Environment Variables.
- In the System Variables window, highlight Path, and click Edit.
- In the Edit System Variables window, insert the cursor at the end of the Variable value field.
- If the last character is not a semi-color (;) add one.
- After the final semi-colon, type the full path to the MySQL binary folder you need to add.
Example: C:\MySQL\bin
- Click Ok in each open window.
- Execute cmd.exe or powershell.exe.
1.2 Install dumptools
Execute the following command:
shell> npm install -g dumptools
2. Usage
2.1 Configure
Configure username and password:
shell> dumptools configure
2.2 Export
Exporting with GUI:
shell> dumptools export
2.3 Import
Import with GUI:
shell> dumptools import
2.4 List
List all databases or tables in one database:
shell> dumptools list