亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

mysql客戶端登陸配置

發布時間:2020-06-04 06:12:56 來源:網絡 閱讀:2064 作者:wjw555 欄目:MySQL數據庫

my.cnf配置文件參數設置:

[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]

配置文件參數介紹:
這樣就能很方便的知道當前位于哪個mysql db上,正在以哪個用戶登錄,對哪個數據庫進行操作,防止誤操作;并且還能顯示當前時間。
tee="/tmp/query.log" 是把每次查詢的SQL及其結果都記錄到 /tmp/query.log 里,便于追蹤。
pager="less -i -n -S" 則是把每次輸出都用less來控制顯示,便于輸出結果格式更加容易閱讀,尤其是行記錄長度超過一屏寬度時。

重啟MySQL服務
[root@cacti ~]# /etc/init.d/mysqld restart
Shutting down MySQL.. SUCCESS!
Starting MySQL... SUCCESS!

登錄mysql后將有以下提示

[root@cacti ~]# mysql -uroot -p'xiaowytest' -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 2
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 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: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 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: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)

參考博文地址:http://www.imysql.cn/2008_07_09_show_mysql_client_settings

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

吉林省| 德钦县| 侯马市| 木里| 兰西县| 长寿区| 嘉鱼县| 大港区| 四平市| 涞源县| 夏河县| 临沂市| 太仆寺旗| 屯门区| 乐至县| 青岛市| 阿荣旗| 鱼台县| 潢川县| 攀枝花市| 周宁县| 库尔勒市| 奉化市| 井研县| 区。| 肃宁县| 兴安盟| 青州市| 钦州市| 田林县| 龙门县| 来宾市| 夏津县| 辽中县| 宜兰市| 岑巩县| 江油市| 东乡县| 富阳市| 刚察县| 上蔡县|