In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to display the current user in the prompt in MySQL, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
The prompt command can display the current user, database, time, and other information in the mysql prompt.
For example:
[root@localhost ~] # mysql-uroot-p-prompt= "\\ u@\ h:\\ d\\ r:\\ m:\\ s >"
Enter password:
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 13
Server version: 5.7.18-log MySQL Community Server (GPL)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Root@localhost: (none) 11:11:19 > use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with-A
Database changed
Root@localhost:test 11:11:22 >
Root@localhost:test 11:11:24 >
Root@localhost:test 11:11:24 >
Root@localhost:test 11:11:25 >
You can also add parameters to the my.cnf. You need to restart the database to take effect:
[mysql]
Prompt=mysql (\\ u@\\ h:\\ d\\ r:\\ m:\\ s) >
About how to display the current user in MySQL prompt to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.