How to change the prompt information under the mysql command we often encounter this problem you are still in your MySQL command mode, the previous prompt information is:
MySQL>, how do we change the prompt information under the mysql command?
In this way, you do not know which database is selected, which user is used to log on, and which server is used to log on. In fact, you only need to add a parameter during logon.
Normal logon is:
MySQL-h localhost-u root-p
You only need to add -- prompt = "prefix" to this information. The command is as follows:
MySQL-h localhost-u root-p -- prompt = "/u @/h:/d:/m/s>"
After you log on to the console, the following information is displayed:
Root @ localhost: 05:03:00>
Where Is the database you selected. Currently, the database is not selected, so it is none. if you select a database:
Use lyb;
The following figure is displayed:
Root @ localhost: Maid 05:03:00>
Haha, isn't that much more convenient?