Skip to main content

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

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

  • fs Flush a MySQL database

  • cp Copy a MySQL database to another

  • ld Import a dump into a 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 https://pypi.org/project/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 to 8)

$ apt-get install python-pip python-mysqldb libmysqlclient-dev

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

Manual install

$ git clone https://github.com/cypx/mysqlrocket
$ cd mysqlrocket
$ python setup.py install

Upgrade

Using pip

$ pip install mysqlrocket --upgrade

Using easy_install

$ easy_install --upgrade mysqlrocket

Uninstall

Using pip

$ pip uninstall mysqlrocket

Examples

Create a new database

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

$ mysqlrocket mk DATABASE_NAME

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

$ mysqlrocket mk DATABASE_NAME -f DATABASE_PASSWORD

Backup databases

Dump all databases available 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 available on your server

$ mysqlrocket ls

Show all databases available 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

Copy a database

Copy a database to another (flush destination database if its exist, create if not)

$ mysqlrocket cp SOURCE_DATABASE_NAME DESTINATION_DATABASE_NAME

Load dump file to database

Load dump file to database (flush destination database if its exist, create if not)

$ mysqlrocket ld SOURCE_DATABASE_NAME FILE_PATH

Flush a database

Flush a database (all content will be deleted)

$ mysqlrocket fs DATABASE_NAME

Check mysqlrocket configuration

Check your mysqlrocket config file and MySQL server connectivity

$ mysqlrocket st

Metadata

Release files for mysqlrocket 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mysqlrocket 0.3.1
File Size Uploaded
mysqlrocket-0.3.1.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mysqlrocket 0.3.1
File Interpreter ABI Platform
mysqlrocket-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 19.3 kB

Release files / mysqlrocket-0.3.1.tar.gz

Download URL mysqlrocket-0.3.1.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
317a5bfecd1079e3d31494fc2ed73ffca037dcc3f35ab32a88ec1c5a03ccd312
BLAKE2b-256 checksum
How to use checksums
32ae8fe6cba83e12ece7ec9d07eabc9a2459868b581b6ac1ce5e4ede6bd0467d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Release files / mysqlrocket-0.3.1-py3-none-any.whl

Download URL mysqlrocket-0.3.1-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e704ab5ebf2e97c0a9f2887cd508626550b1a9555da7eca3f4e82c789237afb
BLAKE2b-256 checksum
How to use checksums
f0edb927bed3ccbd9461ef534ffaaeffcd71aae68e2223e1f614924a75c9be2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

1 release file

0.1.0

1 release file

0.0.17

1 release file

0.0.16

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page