{"id":13826484,"url":"https://github.com/qihoo360/mysql-sniffer","last_synced_at":"2025-04-12T15:34:06.075Z","repository":{"id":40669328,"uuid":"83302177","full_name":"Qihoo360/mysql-sniffer","owner":"Qihoo360","description":"mysql-sniffer is a network traffic analyzer tool for mysql, it is developed by Qihoo DBA and infrastructure team","archived":false,"fork":false,"pushed_at":"2022-06-27T08:02:21.000Z","size":1372,"stargazers_count":853,"open_issues_count":25,"forks_count":294,"subscribers_count":65,"default_branch":"master","last_synced_at":"2025-04-03T14:13:06.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Qihoo360.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-27T11:19:23.000Z","updated_at":"2025-02-20T11:19:50.000Z","dependencies_parsed_at":"2022-08-10T00:24:42.811Z","dependency_job_id":null,"html_url":"https://github.com/Qihoo360/mysql-sniffer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qihoo360%2Fmysql-sniffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qihoo360%2Fmysql-sniffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qihoo360%2Fmysql-sniffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qihoo360%2Fmysql-sniffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qihoo360","download_url":"https://codeload.github.com/Qihoo360/mysql-sniffer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248589905,"owners_count":21129702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T09:01:38.691Z","updated_at":"2025-04-12T15:34:06.044Z","avatar_url":"https://github.com/Qihoo360.png","language":"C","funding_links":[],"categories":["\u003ca id=\"7bf0f5839fb2827fdc1b93ae6ac7f53d\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"32739127f0c38d61b14448c66a797098\"\u003e\u003c/a\u003e嗅探\u0026\u0026Sniff"],"readme":"# MySQL Sniffer [中文介绍](https://github.com/Qihoo360/mysql-sniffer/blob/master/README_CN.md)\nMySQL Sniffer is a network traffic analyzer tool for MySQL, it is developed by Qihoo DBA and infrastructure team. This commandline tool captures and analyzes packets destined for a MySQL \nserver or Client, and outputs them in a standard log format including access time, users, IP, database, query_time, rows number and query.\n\nMySQL Sniffer also analyzer Atlas's network traffic. Atlas is a MySQL protocol-based database middleware project，github：[https://github.com/Qihoo360/Atlas](https://github.com/Qihoo360/Atlas)\n\n# System requirements:\n- Certified to run on CentOS v6 \n- Commandline access to the server with root privileges\n\n# Usage\n```\n./mysql-sniffer -h\nUsage mysql-sniffer [-d] -i eth0 -p 3306,3307,3308 -l /var/log/mysql-sniffer/ -e stderr\n         [-d] -i eth0 -r 3000-4000\n         -d daemon mode.\n         -s how often to split the log file(minute, eg. 1440). if less than 0, split log everyday\n         -i interface. Default to eth0\n         -p port, default to 3306. Multiple ports should be splited by ','. eg. 3306,3307\n            this option has no effect when -f is set.\n         -r port range, Don't use -r and -p at the same time\n         -l query log DIRECTORY. Make sure that the directory is accessible. Default to stdout.\n         -e error log FILENAME or 'stderr'. if set to /dev/null, runtime error will not be recorded\n         -f filename. use pcap file instead capturing the network interface\n         -w white list. dont capture the port. Multiple ports should be splited by ','.\n         -t truncation length. truncate long query if it's longer than specified length. Less than 0 means no truncation\n         -n keeping tcp stream count, if not set, default is 65536. if active tcp count is larger than the specified count, mysql-sniffer will remove the oldest one\n```\n# Install\n```\ngit clone https://github.com/Qihoo360/mysql-sniffer\ncd mysql-sniffer\nmkdir proj\ncd proj\ncmake ../\nmake\ncd bin/\n```\n# Dependence \nglib2-devel(2.28.8)、libpcap-devel(1.4.0)、libnet-devel(1.1.6)\n\n# Install\n\n```\ngit clone git@github.com:Qihoo360/mysql-sniffer.git\ncd mysql-sniffer\nmkdir proj\ncd proj\ncmake ../\nmake\ncd bin/\n```\n\n# More\nMore MySQL Sniffer information, Atlas and some other technology please pay attention to our Hulk platform official account or QQ:104180820 \n\n\u003cimg src=\"http://i.imgur.com/pL4ni57.png\" width = \"500\" alt=\"2\"\u003e\n\n# Thanks\nThanks for the contributions [yihaoDeng](https://github.com/yihaoDeng) and [winkyao](https://github.com/winkyao) have made for MySQL Sniffer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqihoo360%2Fmysql-sniffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqihoo360%2Fmysql-sniffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqihoo360%2Fmysql-sniffer/lists"}