MySQL 5 1以下如何動態抓取查詢日誌

2021-09-05 05:25:27 字數 321 閱讀 7249

想要在mysql 5.1以下的版本中動態抓取提交到mysql中的查詢日誌,可以採用tcpdump的方法,大致如下:

tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings | egrep -i 'select|update|delete|insert|set|commit|rollback|create|drop|alter|call'
eth0指mysqld監聽的網絡卡,330自然是指mysqld監聽的埠,正則匹配模式裡,可以自己新增想要抓取的sql語句型別。

本文出自 「mysql中文網」部落格

MySql 5 1儲存過程

下面是mysql5.1儲存過程和函式的基本語法 1 儲存過程 create definer procedure sp name proc parameter characteristic routine body 2 函式 create definer function sp name func p...

MySQL 5 1 約束簡化

建立表的時候指定約束 primary key主鍵 notnull 非空default 123 預設 unique 唯一constraint fk cid foreign key lie2 references bookcategory category id 外來鍵 ondelete cascade...

MySQL 5 1 原始碼安裝

yum y install libaio ncurses tar zxf mysql 5.1.62.tar.gz cd mysql 5.1.62 a useradd g mysql mysqlgame b configure prefix usr local mysqlgame with chars...