如果select出来的结果集超过几个屏幕,那么前面的结果一晃而过无法看到。使用pager可以设置调用os的more
MySQL> pager more
PAGER set to 'more'
mysql> select * from instance_actions_eventsG
*************************** 1. row ***************************
created_at: 2016-12-18 09:42:07
updated_at: 2016-12-18 09:42:27
deleted_at: NULL
id: 1
event: schedule
action_id: 1
start_time: 2016-12-18 09:42:07
finish_time: 2016-12-18 09:42:27
result: Success
traceback: NULL
deleted: 0
host: NULL
details: NULL
*************************** 2. row ***************************
created_at: 2016-12-18 09:42:07
updated_at: 2016-12-18 09:42:27
deleted_at: NULL
id: 2
event: compute_run_instance
action_id: 1
start_time: 2016-12-18 09:42:00
finish_time: 2016-12-18 09:42:20
result: Success
traceback: NULL
deleted: 0
host: NULL
details: NULL
*************************** 3. row ***************************
created_at: 2016-12-18 09:42:27
updated_at: NULL
deleted_at: NULL
id: 3
event: schedule
action_id: 1
start_time: 2016-12-18 09:42:27
finish_time: NULL
result: NULL
--More--
还原成stdout(取消分屏显示)
mysql> nopager
PAGER set to stdout