Sample config files showing how to colorize linux console mysql client
Latest commit 2f62b8a Aug 19, 2016 @nitso committed on GitHub Updated README file
Specified concrete conifg files to put into home directory
Permalink
Failed to load latest commit information.
.grcat Improved regex for numeric values May 29, 2014
.my.cnf README Aug 8, 2012
LICENSE MIT Licence attached #6 Jul 4, 2015
README.md Updated README file Aug 19, 2016
Screen_G.png screenshots Aug 8, 2012
Screen_table.png screenshots Aug 8, 2012

README.md

colour-mysql-console

Sample config files showing how to colorize linux console mysql client using grc

How to use it

  1. Install grc (for debian systems: apt-get install grc)
  2. Copy both config files into your home directory: .grcat and .my.cnf
  3. Run mysql client mysql -u <user> -p -h <hostname>
  4. Enjoy!

How does it work

Mysql client supports using predefined pager for data output. So we can set grcat (Generic Colouriser) for processing mysql output. grcat reads supplied config file, parses output according to regexp's and adds colours. grc manual can be founded via man grc or here: http://kassiopeia.juls.savba.sk/~garabik/software/grc/README.txt

Sample screenshots

Table screenshot Vertical screenshot

Another one nice hack

You can also use less in pager to have some features like scrolling, search, line numbers etc. pager = grcat ~/.grcat | less -RSFXin

Just type man less to read about less parameters.

LICENSE

Project distributes with standard MIT license