🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

mysql_rake_tasks

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql_rake_tasks

1.0.0
Rubygems
Version published
Maintainers
1
Created
Source

mysql_rake_tasks

A collection of rails rake tasks for mysql

  • create_users - creates localhost mysql user accounts for each database listing in the database.yml
  • stats - database stats - table size

Install

  • Add mysql_rake_tasks to your gem file

gem 'mysql_rake_tasks', '~> 0.1.0'

  • Run the bundle command

bundle install

Examples

create_users

To create mysql users in interactive mode run:

rake db:mysql:create_users mysql user: root mysql pass:

You can also specify your root username and password on the command line:

rake db:mysel:create_users[root,mypassword]

stats

To display database stats:

rake db:mysql:stats +--------------------------------+---------------+-----------+----------+------------+ | Table Name | Rows | Data Size | IDX Size | Total Size | +--------------------------------+---------------+-----------+----------+------------+ | fish | 1.41 Million | 93.6 MB | 41.1 MB | 135 MB | | birds | 0 | 16 KB | 0 Bytes | 16 KB | | cats | 14 | 16 KB | 0 Bytes | 16 KB | | schema_migrations | 7 | 16 KB | 0 Bytes | 16 KB | | users | 5 | 16 KB | 32 KB | 48 KB | +--------------------------------+---------------+-----------+----------+------------+ | | 135 MB | +--------------------------------+---------------+-----------+----------+------------+ Database: mydb_development MySQL Server Version: 5.1.58

License

MIT

Credits

Author: Gregory Ostermayr gregory.ostermayr@gmail.com

Contributed code and/or ideas:

Kevin Woods

Travis Herrick

FAQs

Package last updated on 18 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts