MySQL

概要

MySQLで使えるシステムコマンドのTipsです。

一覧

hostname

mysql> system hostname
b1c8a78553a7

ログに保存

mysql> tee test.log
Logging to file 'test.log'
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql> notee;
Outfile disabled.
mysql> quit
Bye
root@b1c8a78553a7:/# cat test.log
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql> notee;

見やすくするためにpagerをセットする

セット

> pager less -S
とか
> pager more

pagerを解除する

> nopager

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2022-06-30 (木) 01:40:11