Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Sample config files showing how to colorize linux console mysql client
branch: master

Merge pull request #4 from jpducassou/master

Improved regex for numeric values
latest commit 3325805387
@nitso authored
Failed to load latest commit information.
.grcat Improved regex for numeric values
.my.cnf README
README.md typo in README
Screen_G.png screenshots
Screen_table.png screenshots

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
  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.

Something went wrong with that request. Please try again.