<del id="d4fwx"><form id="d4fwx"></form></del>
      <del id="d4fwx"><form id="d4fwx"></form></del><del id="d4fwx"><form id="d4fwx"></form></del>

            <code id="d4fwx"><abbr id="d4fwx"></abbr></code>
          • MySQL5.7.24安裝MySQL審計(jì)插件小記

            1).到網(wǎng)站(https://bintray.com/version/files/mcafee/MySQL-audit-plugin/release/1.1.7-805)下載插件audit-plugin-mysql-5.7-1.1.7-805-linux-x86_64.zip

            創(chuàng)新互聯(lián)建站專注于企業(yè)成都全網(wǎng)營銷、網(wǎng)站重做改版、阿爾山網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5頁面制作、商城開發(fā)、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)網(wǎng)站制作、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為阿爾山等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

            MySQL 5.7.24安裝MySQL審計(jì)插件小記



            2).上傳到MySQL機(jī)器并解壓縮:

            #unzip audit-plugin-mysql-5.7-1.1.7-805-linux-x86_64.zip

            Archive:  audit-plugin-mysql-5.7-1.1.7-805-linux-x86_64.zip

               creating: audit-plugin-mysql-5.7-1.1.7-805/

               creating: audit-plugin-mysql-5.7-1.1.7-805/lib/

              inflating: audit-plugin-mysql-5.7-1.1.7-805/lib/libaudit_plugin.so  

              inflating: audit-plugin-mysql-5.7-1.1.7-805/COPYING  

              inflating: audit-plugin-mysql-5.7-1.1.7-805/THIRDPARTY.txt  

              inflating: audit-plugin-mysql-5.7-1.1.7-805/README.txt  

              inflating: audit-plugin-mysql-5.7-1.1.7-805/plugin-name.txt  

               creating: audit-plugin-mysql-5.7-1.1.7-805/utils/

              inflating: audit-plugin-mysql-5.7-1.1.7-805/utils/offset-extract.sh 

              


            3).查看mysql的插件目錄:

              mysql> show global variables like 'plugin_dir';

            +---------------+-------------------------------------+

            | Variable_name | Value                               |

            +---------------+-------------------------------------+

            | plugin_dir    | /usr/local/mysql-5.7.24/lib/plugin/ |

            +---------------+-------------------------------------+

            1 row in set (0.01 sec)


            4).拷貝libaudit_plugin.so到mysql插件目錄:

            # cp lib/libaudit_plugin.so  /usr/local/mysql-5.7.24/lib/plugin/



            5).安裝libaudit_plugin.so插件:

            mysql> install plugin audit soname 'libaudit_plugin.so';

            Query OK, 0 rows affected (3.97 sec)


            6).開啟審計(jì)功能:

            mysql> set global audit_json_file=1;

            Query OK, 0 rows affected (0.00 sec)


            7).在mysql的數(shù)據(jù)文件目錄里生成審計(jì)日志:

            mysql> show variables like 'datadir';

            +---------------+-------------------+

            | Variable_name | Value             |

            +---------------+-------------------+

            | datadir       | /home/mysql/data/ |

            +---------------+-------------------+

            1 row in set (0.01 sec)


            8).查看審計(jì)日志內(nèi)容:

            #less /home/mysql/data/mysql-audit.json 

            {"msg-type":"header","date":"1550816633651","audit-version":"1.1.7-805","audit-protocol-version":"1.0","hostname":"test2","mysql-version":"5.7.24-log","mysql-program":"/usr/local/mysql-5.7.24/bin/mysqld","mysql-socket":"/tmp/mysql.sock","mysql-port":"3306","server_pid":"6485"}

            {"msg-type":"activity","date":"1550816633651","thread-id":"126897","query-id":"3356369","user":"root","priv_user":"root","ip":"","host":"localhost","connect_attrs":{"_os":"linux-glibc2.12","_client_name":"libmysql","_pid":"13108","_client_version":"5.7.24","_platform":"x86_64","program_name":"mysql"},"pid":"13108","os_user":"root","appname":"mysql","status":"0","cmd":"set_option","query":"set global audit_json_file=1"}

            {"msg-type":"activity","date":"1550816634816","thread-id":"126952","query-id":"0","user":"monitor","priv_user":"","ip":"192.168.140.52","host":"192.168.140.52","connect_attrs":{"_os":"Linux","_client_name":"libmariadb","_pid":"21686","_client_version":"2.3.1","_platform":"x86_64","program_name":"proxysql_monitor"},"status":"1045","cmd":"Failed Login","query":"Failed Login"}

            {"msg-type":"activity","date":"1550816634816","thread-id":"126952","query-id":"0","user":"monitor","priv_user":"","ip":"192.168.140.52","host":"192.168.140.52","connect_attrs":{"_os":"Linux","_client_name":"libmariadb","_pid":"21686","_client_version":"2.3.1","_platform":"x86_64","program_name":"proxysql_monitor"},"cmd":"Connect","query":"Connect"}

            ................................................................................................................................................................

            ................................................................................................................................................................

            ................................................................................................................................................................

            ................................................................................................................................................................


            9).查看加載的審計(jì)插件:

            mysql> select * from INFORMATION_SCHEMA.PLUGINS where  PLUGIN_NAME like '%AUDIT%';

            +-------------+----------------+---------------+-------------+---------------------+--------------------+------------------------+---------------+--------------------------------------------------------------+----------------+-------------+

            | PLUGIN_NAME | PLUGIN_VERSION | PLUGIN_STATUS | PLUGIN_TYPE | PLUGIN_TYPE_VERSION | PLUGIN_LIBRARY     | PLUGIN_LIBRARY_VERSION | PLUGIN_AUTHOR | PLUGIN_DESCRIPTION                                           | PLUGIN_LICENSE | LOAD_OPTION |

            +-------------+----------------+---------------+-------------+---------------------+--------------------+------------------------+---------------+--------------------------------------------------------------+----------------+-------------+

            | AUDIT       | 1.0            | ACTIVE        | AUDIT       | 4.1                 | libaudit_plugin.so | 1.6                    | McAfee Inc    | AUDIT plugin, creates a file mysql-audit.log to log activity | GPL            | ON          |

            +-------------+----------------+---------------+-------------+---------------------+--------------------+------------------------+---------------+--------------------------------------------------------------+----------------+-------------+

            1 row in set (0.00 sec)

            10).查看MySQL審計(jì)相關(guān)參數(shù):

            mysql> show global variables like '%audit%';

            +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

            | Variable_name                   | Value                                                                                                                                                                                                                                                                                                                                                                                       |

            +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

            | audit_before_after              | after                                                                                                                                                                                                                                                                                                                                                                                       |

            | audit_checksum                  |                                                                                                                                                                                                                                                                                                                                                                                             |

            | audit_client_capabilities       | OFF                                                                                                                                                                                                                                                                                                                                                                                         |

            | audit_delay_cmds                |                                                                                                                                                                                                                                                                                                                                                                                             |

            | audit_delay_ms                  | 0                                                                                                                                                                                                                                                                                                                                                                                           |

            | audit_force_record_logins       | OFF                                                                                                                                                                                                                                                                                                                                                                                         |

            | audit_header_msg                | ON                                                                                                                                                                                                                                                                                                                                                                                          |

            | audit_json_file                 | ON                                                                                                                                                                                                                                                                                                                                                                                          |

            | audit_json_file_bufsize         | 1                                                                                                                                                                                                                                                                                                                                                                                           |

            | audit_json_file_flush           | OFF                                                                                                                                                                                                                                                                                                                                                                                         |

            | audit_json_file_retry           | 60                                                                                                                                                                                                                                                                                                                                                                                          |

            | audit_json_file_sync            | 0                                                                                                                                                                                                                                                                                                                                                                                           |

            | audit_json_log_file             | mysql-audit.json                                                                                                                                                                                                                                                                                                                                                                            |

            | audit_json_socket               | OFF                                                                                                                                                                                                                                                                                                                                                                                         |

            | audit_json_socket_name          | /var/run/db-audit/mysql.audit__home_mysql_data_3306                                                                                                                                                                                                                                                                                                                                         |

            | audit_json_socket_retry         | 10                                                                                                                                                                                                                                                                                                                                                                                          |

            | audit_json_socket_write_timeout | 1000                                                                                                                                                                                                                                                                                                                                                                                        |

            | audit_offsets                   |                                                                                                                                                                                                                                                                                                                                                                                             |

            | audit_offsets_by_version        | ON                                                                                                                                                                                                                                                                                                                                                                                          |

            | audit_password_masking_cmds     | CREATE_USER,GRANT,SET_OPTION,SLAVE_START,CREATE_SERVER,ALTER_SERVER,CHANGE_MASTER,UPDATE                                                                                                                                                                                                                                                                                                    |

            | audit_password_masking_regex    | identified(?:/\*.*?\*/|\s)*?by(?:/\*.*?\*/|\s)*?(?:password)?(?:/\*.*?\*/|\s)*?['|"](?<psw>.*?)(?<!\\)['|"]|password(?:/\*.*?\*/|\s)*?\((?:/\*.*?\*/|\s)*?['|"](?<psw>.*?)(?<!\\)['|"](?:/\*.*?\*/|\s)*?\)|password(?:/\*.*?\*/|\s)*?(?:for(?:/\*.*?\*/|\s)*?\S+?)?(?:/\*.*?\*/|\s)*?=(?:/\*.*?\*/|\s)*?['|"](?<psw>.*?)(?<!\\)['|"]|password(?:/\*.*?\*/|\s)*?['|"](?<psw>.*?)(?<!\\)['|"] |

            | audit_record_cmds               |                                                                                                                                                                                                                                                                                                                                                                                             |

            | audit_record_objs               |                                                                                                                                                                                                                                                                                                                                                                                             |

            | audit_sess_connect_attrs        | ON                                                                                                                                                                                                                                                                                                                                                                                          |

            | audit_socket_creds              | ON                                                                                                                                                                                                                                                                                                                                                                                          |

            | audit_uninstall_plugin          | OFF                                                                                                                                                                                                                                                                                                                                                                                         |

            | audit_validate_checksum         | ON                                                                                                                                                                                                                                                                                                                                                                                          |

            | audit_validate_offsets_extended | ON                                                                                                                                                                                                                                                                                                                                                                                          |

            | audit_whitelist_cmds            | BEGIN,COMMIT,PING                                                                                                                                                                                                                                                                                                                                                                           |

            | audit_whitelist_users           |                                                                                                                                                                                                                                                                                                                                                                                             |

            +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

            30 rows in set (0.01 sec)

            網(wǎng)頁題目:MySQL5.7.24安裝MySQL審計(jì)插件小記
            網(wǎng)站鏈接:http://www.jbt999.com/article16/ihscdg.html

            成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站收錄建站公司、ChatGPT、品牌網(wǎng)站建設(shè)、關(guān)鍵詞優(yōu)化、小程序開發(fā)

            廣告

            聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:[email protected]。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

            成都定制網(wǎng)站網(wǎng)頁設(shè)計(jì)

              <del id="d4fwx"><form id="d4fwx"></form></del>
              <del id="d4fwx"><form id="d4fwx"></form></del><del id="d4fwx"><form id="d4fwx"></form></del>

                    <code id="d4fwx"><abbr id="d4fwx"></abbr></code>
                  • 久草免费福利 | www.最全三级在线 | 中文字幕日本第一页 | 操B视频在线观看 | 乳大有奶水风流少妇 |