1

I'm using mysql 5.7.27 in CentOS 7, and I want a colorful prompt in command line. I found a solution here. But it doesn't work for my environment.

alias penguins=$(echo -e 'mysql --prompt="\x1B[31m\\u\x1B[34m@\x1B[32m\\v\x1B[0m:\x1B[36m\\d>\x1B[0m " ')

Here is the screenshot

I searched for the all day but didn't find any solution, even rlwrap doesn't work for my mysql prompt.

biao
  • 113

1 Answers1

0

Found a workaround eventually.

readline has been replaced by editline wrapper since mysql 5.6.5, that's why rlwrap and other solutions don't work for me.

So I used and older client version - 5.6.4 - to connect to mysql server.

biao
  • 113