Mysqlknife
TODO: Write a gem description
Installation
Install this tool executing the following command:
$ gem install mysqlkill
Usage
Swap Databases
Swap tables and views between two databases.
You need to rename two databases, for example, foo and bar. You only need to run the following command and save the STDOUT output to a file and then execute DML statements.
$ mysqlknife swap --host 127.0.0.1 --user root --password admin --databases from,to > swap.sql
$ mysql -h 127.0.0.1 -u root -padmin < swap.sql
Kill process
Please, follow next instructions to kill process:
$ mysqlknife kill --host 127.0.0.1 --user root --pass admin --where "time >= 200" --list
$ mysqlknife kill --host 127.0.0.1 --user root --pass admin --where "time >= 200"
Warning
- Do not use this tool in production before testing it.
- Please, use when do you need.
- The author is NOT responsible for misuse use of this tool.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request