In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.