自动记录 mysql.exe 客户端的屏幕显示

我想在mysql环境下打印数据库表,但我用desc book /p却不能打印出来,这是为什么,
请各位大侠帮帮我,如何在mysql环境下打印数据库表!
---------------------------------------------------------------

:》

那没有办法了,
1、自己编程序
2、拷贝屏幕
3、输出到文本文件

在mysql.exe中有一个tee 指令
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
它可以将自己的屏幕显示保存到一个文本文件中去

例:

Microsoft Windows 2000 [Version 5.00.2195]
(C) 版权所有 1985-1998 Microsoft Corp.

D:>cd mysql\bin

D:\mysql\bin>mysql
D:\mysql\bin>mysql -h localhost -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10 to server version: 4.0.4-beta-max-nt-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> tee 123.txt;
Logging to file '123.txt'
Logging to file '123.txt'
mysql> SHOW DATABASES;
+------------+
¦ Database ¦
+------------+
¦ catv ¦
¦ catv_back ¦
¦ mysql ¦
¦ test ¦
+------------+
4 rows in set (0.00 sec)

mysql> exit
Bye

D:\mysql\bin>

这样就可以打开d:\mysql\bin目录中的123.txt文件
所有屏幕显示都在里面了

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus