Chinaunix首页 | 论坛 | 博客
  • 博客访问: 490132
  • 博文数量: 99
  • 博客积分: 3621
  • 博客等级: 中校
  • 技术积分: 1089
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-22 16:29
文章存档

2012年(21)

2011年(28)

2010年(50)

分类: Mysql/postgreSQL

2012-02-29 15:16:57

1:打开通用日志
2:还存了一份在这里,今天才知道
 
[root@devdb1 ~]# cd /home/bzuo/
[root@devdb1 ~]# ls -al .mysql_history
-rw------- 1 root root 41536 Feb 28 23:12 .mysql_history
[root@devdb1 ~]# more .mysql_history
 
 
On Unix, the mysql client writes a record of executed statements to a history file. By default, this file is named
.mysql_history and is created in your home directory. To specify a different file, set the value of the MYSQL_HISTFILE environment
variable.
The .mysql_history should be protected with a restrictive access mode because sensitive information might be written to it,
such as the text of SQL statements that contain passwords. See Section 5.3.2.2, “End-User Guidelines for Password Security”.
It is possible to suppress logging of statements to the history file by using the --batch or --execute option.
If you do not want to maintain a history file, first remove .mysql_history if it exists, and then use either of the following techniques:
• Set the MYSQL_HISTFILE variable to /dev/null. To cause this setting to take effect each time you log in, put the setting
in one of your shell's startup files.
• Create .mysql_history as a symbolic link to /dev/null:
shell> ln -s /dev/null $HOME/.mysql_history
You need do this only once.
阅读(2017) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

布毫铯2012-03-02 03:17:32

额(⊙o⊙)…看不懂~