views:

273

answers:

3

Is there a way to set a color scheme for the mysql client? It might sound trivial, but I'd like to be able to set some level of colors for terminal client.

A: 

You should set color scheme for your terminal emulator or console window.

el.pescado
ehh, I already have a color scheme setup for my terminal. I'm looking for stuff specific to Mysql. For example, if every other row was a diff color, or if the prompt was a diff color, or the headers were a diff color. See where I'm driving here?
Cory Collier
A: 

Mysql text client is really basic, if you need something more advanced, you could try MySQL Query Browser, which is a GUI client.

el.pescado
+1  A: 

You could use rlwrap if you just want a colour prompt:

% rlwrap --prompt-colour='1;34' mysql

Note: contrary to convention, rlwrap spells colour with a U.

If you want everything in colour, check out acoc - Arbitrary Command Output Colourer. Not sure if it works with interactive programs, you might need to extend it or write your own.

Matt Curtis
"color" is just the American way to spell it.
Neil
It seems you have to do: `rlwrap -a -p'RED' mysql` to get it working properly. Without the -a the prompt doesn't get coloured.
Neil
@Neil: Sure, "colour" is how Australians spell it when writing, but most developers use "color" by convention for things like this because it avoids all sorts of unnecessary confusion.
Matt Curtis