README
OM2B SQL
A unuseful tool to export and import .sql file with MySQL. If it is unuseful, it is essential.
1. Installation
OMB2B SQL 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 OM2B SQL
Execute the following command:
shell> npm install -g om2bsql
2. Usage
2.1 Export
Exporting with GUI:
shell> om2bsql export
2.2 Import
Import with GUI:
shell> om2bsql import
2.3 List
List all databases or tables in one database:
shell> om2bsql list