- 论坛徽章:
- 8
|
下面是我的测试
[mysql]
prompt=\\U:\\d \\R:\\m:\\s>
#prompt=\\U:\\d \\D>
tee=/tmp/myaction.log
touch /tmp/myaction.log
restart mysqld
-bash-3.1# cat /tmp/myaction.log
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.45 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
root@localhost:(none) 15:10:06>use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
root@localhost:test 15:10:08>show tables;
+----------------+
| Tables_in_test |
+----------------+
| t1 |
| t2 |
| t3 |
| test_inc |
| userinfo |
+----------------+
5 rows in set (0.00 sec)
root@localhost:test 15:10:11>desc t1;
+-------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| a | int(11) | NO | | 0 | |
+-------+---------+------+-----+---------+-------+
1 row in set (0.00 sec)
root@localhost:test 15:10:13>select * from t1;
+---+
| a |
+---+
| 1 |
| 2 |
| 3 |
+---+
3 rows in set (0.00 sec)
root@localhost:test 15:11:39>update t1 set a=3 where a=3;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
root@localhost:test 15:11:51>select * from t1;
+---+
| a |
+---+
| 1 |
| 2 |
| 3 |
+---+
3 rows in set (0.00 sec)
root@localhost:test 15:11:52>update t1 set a=4 where a=3;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
root@localhost:test 15:12:00>select * from t1;
+---+
| a |
+---+
| 1 |
| 2 |
| 4 |
+---+
3 rows in set (0.00 sec)
root@localhost:test 15:12:03>exit
-bash-3.1#
[ 本帖最后由 ruochen 于 2009-11-27 15:15 编辑 ] |
|