Sudo
Correctly setting your mysql prompt using sudo
If you run multiple MySQL environments on multiple servers it’s a good habit to set your MySQL prompt to double check which server you are on. however, using the MYSQL_PS1 environment variable I found this does not work under sudo (the normal way people run sudo).
Read more