Skip to main content

Simple CLI tool to create and delete easily MySQL databases.

Project description

MysqlRocket is a Simple CLI tool to create and delete easily MySQL databases.

Flattr this git repo

usage: mysqlrocket [-h] [-v] [-u U] [-H H] [-p P] {bk,dp,mk,ls,rm,st} …

mysqlrocket commands are:

  • bk Backup all databases on MySQL server
  • dp Dump and gzip a MySQL database
  • mk Create a MySQL database with an dedicated user and a random password
  • ls Show databases on MySQL server
  • rm Delete a MySQL database
  • st Check your mysqlrocket config and MySQL server connectivity

Optional arguments:

  • -h, –help show this help message and exit
  • -v, –version Show program version.
  • -u U mysql user
  • -H H mysql host
  • -p P mysql password

See ‘mysqlrocket <command> -h’ for more information on a specific command.

PyPI package http://pypi.python.org/pypi/mysqlrocket

Sources https://github.com/cypx/mysqlrocket

Installation

Install it easily:

Using pip

$ pip install mysqlrocket

Using easy_install

On most Linux distribution

$ easy_install mysqlrocket

But on some, prerequisites are required, for example, on Debian 6

$ aptitude install python-pip python2.6-mysqldb

(mysqldb could not be installed by easy_install cause of some system dependencies)

Upgrade

Using pip

$ pip --upgrade mysqlrocket

Using easy_install

$ easy_install --upgrade mysqlrocket

Examples

Create a new database

Create a new database whith an associated user account using the same name and a random password

$ mysqlrocket mk DATABASE_NAME

Create a new database whith an associated user account using the same name and force password

$ mysqlrocket mk DATABASE_NAME -f DATABASE_PASSWORD

Backup databases

Dump all databases avalaible on your server to the current directory

$ mysqlrocket bk

Dump database

Dump a databases to the current directory

$ mysqlrocket dp DATABASE_NAME

Show all databases

Show all databases avalaible on your server

$ mysqlrocket ls

Show all databases avalaible on your server and some information (tables number, size…)

$ mysqlrocket ls -a

Remove a database

Remove a database and all user account with the same name if they exist

$ mysqlrocket rm DATABASE_NAME

Check mysqlrocket configuration

Check your mysqlrocket config file and MySQL server connectivity

$ mysqlrocket st

Project details


Release history Release notifications

History Node

0.2.0

This version
History Node

0.1.0

History Node

0.0.17

History Node

0.0.16

History Node

0.0.15

History Node

0.0.14

History Node

0.0.13

History Node

0.0.12

History Node

0.0.11

History Node

0.0.10

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mysqlrocket-0.1.0.tar.gz (7.2 kB) Copy SHA256 hash SHA256 Source None Apr 26, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page