将MYSQL的操作输出记载到指定文件里。

很实用  也经常用到的功能。

mysql> \T /home/woody/mysql.log
Logging to file ‘/home/woody/mysql.log’
mysql> \s
————–
mysql  Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (i486) using readline 5.2
Connection id:        42
Current database:    hello_test
Current user:        root@localhost
SSL:            Not in use
Current pager:        stdout
Using outfile:        ‘/home/woody/mysql.txt’
Using delimiter:    ;
Server version:        5.0.75-0ubuntu10.2 (Ubuntu)
Protocol version:    10
Connection:        Localhost via UNIX socket
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:        /var/run/mysqld/mysqld.sock
Uptime:            2 hours 15 min 55 sec
Threads: 1  Questions: 194  Slow queries: 0  Opens: 71  Flush tables: 3  Open tables: 12  Queries per second avg: 0.024
Note that you are running in safe_update_mode:
UPDATEs and DELETEs that don’t use a key in the WHERE clause are not allowed.
(One can force an UPDATE/DELETE by adding LIMIT # at the end of the command.)
SELECT has an automatic ‘LIMIT 1000′ if LIMIT is not used.
Max number of examined row combination in a join is set to: 1000000
————–
mysql> \t
Outfile disabled.

评论

此博客中的热门博文

Kettle设计中 判断的基准和多数据流时的主键唯一性

9月的诚品书单[待修订]

引用 vista下.lnk快捷方式打开方式修复