Skip to content

Instantly share code, notes, and snippets.

@matiskay
Created January 11, 2012 20:24
Show Gist options
  • Save matiskay/1596583 to your computer and use it in GitHub Desktop.
Save matiskay/1596583 to your computer and use it in GitHub Desktop.
Change mysql prompt

Change your mysql prompt

Use an environment variable. You can set the MYSQL_PS1 environment variable to a prompt string. For example:

  export MYSQL_PS1="(\u@\h) [\d]> "

More info

  • man mysql
PROMPT set to '(\u@\h) [\d]>\_'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment