MySQL does not convert strings like \e, \033, \x01 or \x02 into their raw value. This makes it hard to copy/paste the prompts into my.cnf. Use something like VIM to copy/paste the raw string. If you like to roll your own. Use the following keys: CTRL-V CTRL-A for \0x1 CTRL-V CTRL-B for \0x2 CTRL-V ESC for \e or \033 Of course it's uglier than using \[ \] and \e like you can with bash prompts, but it's far better than using rlwrap in my opinion. \0x1 and \0x2 tells readline() to skip charactes in between for the length calculation. Without those chars, the line will wrap before reaching the end. # Gentoo style prompt=\\u@\\h \\d >\\_ # 8 color prompt prompt=\\u@\\h \\d >\\_ # 256 color prompt prompt=\\u@\\h \\d >\\_ # 256 color prompt variant 2 prompt=\\u@\\h \\d >\\_