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)06/01 Report--
My.cnf profile parameter settings:
[root@cacti] # head-7 / etc/my.cnf
[mysql] prompt= "(\\ u@\ h:\ R:\ m:\\ s) [\\ d] >" pager= "less-I-n-S" tee= "/ tmp/query.log" no-auto-rehash [mysqld]
Profile parameters description:
This makes it easy to know which mysql db you are currently on, which user you are logging in with, which database you are operating on, to prevent misoperation, and to display the current time.
Tee= "/ tmp/query.log" records the SQL and its results of each query in / tmp/query.log for easy tracking.
Pager= "less-I-n-S" is to use less to control the display of each output, making the output format easier to read, especially when the line record length exceeds one screen width.
Restart the MySQL service:
[root@cacti ~] # / etc/init.d/mysqld restart
Shutting down MySQL.. SUCCESS!
Starting MySQL... SUCCESS!
After logging in to mysql, you will be prompted as follows:
[root@cacti] # mysql-uroot-pitchxiaowytest-S / tmp/mysql3307.sock * * Logging to file'/ tmp/query.log'**Warning: Using a password on the command line interface can be insecure.Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 2Server version: 5.6.20-log MySQL Community Server (GPL) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement. (root@localhost:17:53:43) [(none)] > (root@localhost:17:53:43) [(none)] > use ranzhidb;Database changed (root@localhost:17:56:15) [ranzhidb] > select id,account from droa_attend where id=10 and account='xiawu';Empty set (0.00 sec) (root@localhost:17:57:08) [ranzhidb] > select id,account from droa_attend where id=10 and account='xiaowu' +-+-+ | id | account | +-+-+ | 10 | xiaowu | +-+-+ 1 row in set (0.00 sec)
[root@cacti ~] # tailf / tmp/query.log
Server version: 5.6.20-log MySQL Community Server (GPL) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement. (root@localhost:17:53:43) [(none)] > use ranzhidb;Database changed (root@localhost:17:56:15) [ranzhidb] > select id,account from droa_attend where id=10 and account='xiawu';Empty set (0.00 sec) (root@localhost:17:57:08) [ranzhidb] > select id,account from droa_attend where id=10 and account='xiaowu' +-+-+ | id | account | +-+-+ | 10 | xiaowu | +-+-+ 1 row in set (0.00 sec)
Reference blog address: http://www.imysql.cn/2008_07_09_show_mysql_client_settings
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.