Skip to content

A Bash Shell script to aid in using mysql at command line. Includes some Drupal features

License

Notifications You must be signed in to change notification settings

worxco/simplesql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OVERVIEW

This is a Bash script.
The purpose, like most programs, is to support my lazyness.

By creating the $usage portion, it reminded me what parameters
I needed to get a particular job done. 

Also, I have used a variety of mysql commands to accomplish things.

And as time went on, I found a need to do some special things for
our Drupal databases. So, there are some Drupal specific features
that I have put here as well.

The easiest way to learn the use of the script is to just launch 
it with -h for help. This will print out the usage portion of 
the script.

FEATURES
	create a dump with --skip-extended-insert so I can read/modify the rows
	restore one of those dumps.
	create a Drupal dump (sans watchdog, sessions, and caches)
	copy a database from one DB to another
	Clone (copy with create) a database to a New database
	Run an arbitrary command 
	Run a series of commands from a file
	export CSV copies of a specified table
	edit - enter mysql CLI 
	Show a list of tables in a database
	Display 'top' like statistics (requires mytop)
	Batch alter of all admin passwords for Drupal databases

LOCATION

I normally would put this in my ~/bin directory and set it to be executable.

SUPPORTING FILE

This script is as I said, for my lazyness. If you supply a file named
simplesql.conf, you can place default values there.

I use it to support about 30 different mysql servers. Each with hundreds of
databases. Many of them are Drupal databases, so that explains the extra
features that are Drupal specific.

The struction fo the 'simplesql.conf' file is documented at the front
of the simplesql script.


About

A Bash Shell script to aid in using mysql at command line. Includes some Drupal features

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages