Discover Packages
github.com/masahide/mysql-audit-proxy
command
module
Version:
v0.0.0-...-7ad3904
Opens a new window with list of versions in this module.
Published: Jun 17, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
mysql-audit-proxy
Proxy for mysql audit recording
Download
release page
Usage:
mysql-audit-proxy [flags]
Flags:
--buf string buffer size (default "32mb")
--q int max log buffer queues (default 200)
--flush duration time to flush buffer (default 1s)
--listen string Listen address [ip or hostname or socketFileName] (default "localhost:3330")
--net string Listen net ['tcp' or 'unix'] (default "tcp")
--log string logfile path (default "mysql-audit.%Y%m%d%H.log")
--rotate duration logfile rotatetime (default 1h0m0s)
--logGzip Gzip compress log files
-h, --help help for mysql-audit-proxy
test
# start mysql 5.7
docker run --rm --name demo_mysql -e MYSQL_ROOT_PASSWORD=secret -p 3306:3306 -d mysql:5.7
# connect
MYSQL_PWD=secret mysql -h 127.0.0.1 -uroot
# Execute sql
MYSQL_PWD=secret mysql -h 127.0.0.1 -uroot -e "select CHAR_LENGTH('hnogedff') as len"
# run mysql-audit-proxy
./mysql-audit-proxy --listen :3330 --log tmp/%Y%m%d%H%M.log --logGzip --rotate 1m
# Execute SQL through proxy
mysql -h 127.0.0.1 -P 3330 -u 'root:secret@127.0.0.1:3306' -e "select CHAR_LENGTH('hnogedff') as len"
Expand ▾
Collapse ▴
Documentation
¶
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Source Files
¶
Directories
¶
pkg
Click to show internal directories.
Click to hide internal directories.