MySQL MariaDB – Setting Prompt to a Variable

mariadbMySQL

I would like to change the prompt to my mariadb or mysql client.

I would like the prompt to be the contain of a variable like report_host or more, to something that can change like default_master_connection.

Does someone know how to do it?

Best Answer

AFAIK MySQL prompt cannot be set to MySQL variables (Global or Session). The only options that can be used are documented at https://dev.mysql.com/doc/refman/5.7/en/mysql-commands.html (look towards the end of the documentation page for a full list).