Mysqlknife

MySQL Knife is a Ruby Gem and command line tools, written for MAC OS because use iTerm2 to set colors. That allows many tasks in MySQL Administration is easily for normal installation (MySQL) or in Amazon RDS. You can:

  • Configure many connections to access and run any commands.
  • Skip error is slave.
  • Kill process.

Installation

Install this tool executing the following command:

$ gem install mysqlknife

Configurarion

vim ~/.db.yml

ssh:
  user: root
  host: demo.com
  port: 22
  keys: '~/.ssh/default.pem'

databases:
  localhost:
    ssh: false
    color: green
    port: 3306
    host: 127.0.0.1
    username: root
    password: admin

  devel:
    ssh: false
    color: orange
    port: 3306
    host: master.demo.com
    username: root
    password: admin
    slaves:
      - devel-mysql-slave01.demo.com
      - devel-mysql-slave02.demo.com
    tools:
      - 'innotop -h #{@host} -u #{@username} #{@password}'

  prod:
    ssh: true
    color: red
    port: 3306
    host: prod-mysql-master.demo.com
    username: root
    password: admin
    slaves:
      - prod-mysql-slave01.demo.com
      - prod-mysql-slave02.demo.com

Warning

  1. Do not use this tool in production before testing it.
  2. Please, use when do you need.
  3. The author is NOT responsible for misuse use of this tool.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request