All Projects → orderbynull → Lottip

orderbynull / Lottip

Licence: mit
Simple MySQL proxy for query logging with web GUI

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Lottip

Smproxy
Swoole MySQL Proxy 一个基于 MySQL 协议,Swoole 开发的MySQL数据库连接池。 A MySQL database connection pool based on MySQL protocol and Swoole.
Stars: ✭ 1,665 (+608.51%)
Mutual labels:  mysql, proxy
Mycat2
MySQL Proxy using Java NIO based on Sharding SQL,Calcite ,simple and fast
Stars: ✭ 750 (+219.15%)
Mutual labels:  mysql, proxy
Scany
Library for scanning data from a database into Go structs and more
Stars: ✭ 228 (-2.98%)
Mutual labels:  mysql
Lightsocks Python
⚡️一个轻巧的网络混淆代理🌏
Stars: ✭ 235 (+0%)
Mutual labels:  proxy
Chameleon
Customizable honeypots for monitoring network traffic, bots activities and username\password credentials (DNS, HTTP Proxy, HTTP, HTTPS, SSH, POP3, IMAP, STMP, RDP, VNC, SMB, SOCKS5, Redis, TELNET, Postgres and MySQL)
Stars: ✭ 230 (-2.13%)
Mutual labels:  proxy
Bettercap
DEPRECATED, bettercap developement moved here: https://github.com/bettercap/bettercap
Stars: ✭ 2,518 (+971.49%)
Mutual labels:  proxy
Qtgate Desktop Client
A revolutionary internet infrastructure enabling a truly free Network, that offers Stability, Trust, Privacy, and Security
Stars: ✭ 232 (-1.28%)
Mutual labels:  proxy
Mysql Notes
MySQL 学习笔记
Stars: ✭ 227 (-3.4%)
Mutual labels:  mysql
Mysql
Async MySQL client for PHP based on Amp.
Stars: ✭ 235 (+0%)
Mutual labels:  mysql
Devops Bash Tools
550+ DevOps Bash Scripts - AWS, GCP, Kubernetes, Kafka, Docker, APIs, Hadoop, SQL, PostgreSQL, MySQL, Hive, Impala, Travis CI, Jenkins, Concourse, GitHub, GitLab, BitBucket, Azure DevOps, TeamCity, Spotify, MP3, LDAP, Code/Build Linting, pkg mgmt for Linux, Mac, Python, Perl, Ruby, NodeJS, Golang, Advanced dotfiles: .bashrc, .vimrc, .gitconfig, .screenrc, .tmux.conf, .psqlrc ...
Stars: ✭ 226 (-3.83%)
Mutual labels:  mysql
Wilayah
Kode dan Data Wilayah Administarsi Indonesia sesuai Permendagri No 72 Tahun 2019 dengan PHP+MySQL+AJaX. Demo link : https://wilayah.cahyadsn.com/v2/
Stars: ✭ 231 (-1.7%)
Mutual labels:  mysql
Sqliterally
Lightweight SQL query builder
Stars: ✭ 231 (-1.7%)
Mutual labels:  mysql
Pony
Pony Object Relational Mapper
Stars: ✭ 2,762 (+1075.32%)
Mutual labels:  mysql
Sequelize Auto Migrations
Migration generator && runner for sequelize
Stars: ✭ 233 (-0.85%)
Mutual labels:  mysql
Pallas
Curator is to Zookeeper what Pallas is to Elasticsearch
Stars: ✭ 230 (-2.13%)
Mutual labels:  proxy
Il Ilce Mahalle Sokak Cadde Sql
Türkiye İl, İlçe, Mahalle, Sokak, Cadde Bilgisi SQL Şeklinde
Stars: ✭ 235 (+0%)
Mutual labels:  mysql
Twist
A light script for you to setup shadowsocks-libev server with high-speed connections and newest powerful features
Stars: ✭ 229 (-2.55%)
Mutual labels:  proxy
Zjl
ZJL 免流防跳脚本
Stars: ✭ 222 (-5.53%)
Mutual labels:  proxy
Storagetapper
StorageTapper is a scalable realtime MySQL change data streaming, logical backup and logical replication service
Stars: ✭ 232 (-1.28%)
Mutual labels:  mysql
Aspnetcore.proxy
ASP.NET Core Proxies made easy.
Stars: ✭ 234 (-0.43%)
Mutual labels:  proxy

Lottip

Lottip is proxy for MySQL RDBMS with web GUI. It will show you what's happening under the hood of your database layer. As it sits between your application and MySQL server there's no need to use tools like Wireshark or enable general logs to see which queries are being executed. It comes as single binary with zero dependencies and consists of 2 parts: proxy server and embedded GUI.

Screenshots

Query list Freezed query Query error In app results
Example 1 Example 2 Example 3 Example 4

Main features

Lottip is on it's early stage of development.

For now you can:

  1. See all queries sent from your application to MySQL grouped by connection it belongs to.
  2. Track query execution result: success(green indicator), pending(yellow indicator) and error(red indicator).
  3. See query execution time(it includes time to transfer data over network).
  4. Filter queries by string.
  5. Execute any query and see results immediately.
  6. Run lottip in Docker container. Thanks to @tm-lmathieu

Installation

Binary

Get binaries from releases page

From sources on Mac/Linux
go get github.com/orderbynull/lottip
go install github.com/mjibson/esc
cd $GOPATH/src/github.com/orderbynull/lottip
$GOPATH/bin/esc -o fs.go -prefix web -include=".*\.css|.*\.js|.*\.html|.*\.png" web
go build
./lottip

How to run

There're 4 simple steps to get everything up and running:

  1. Run binary from terminal like this: ./lottip_linux_amd64. You'll see something like this:

    Forwarding queries from '127.0.0.1:4041' to '127.0.0.1:3306'

    Web gui available at 'http://127.0.0.1:9999'

  2. Tell your app to connect to MySQL via port 4041 instead of 3306.

  3. Go to http://127.0.0.1:9999 and you'll see nice GUI.

  4. Play with your app and see all SQL-queries flowing between your app and MySQL. No need for page refresh because websockets are used to communicate between frontend and backend.

Use cases

Here're few use cases i use on my everyday basis so it may be helpful to someone.

Use locally

Just run lottip on your local machine and point your app to it. You can also run few lottip instances each on it's own port. This is an easy way to keep multiple app separated and view queries independently.

Use remotely

Let's say you're writing your PHP code locally but run it on dev server and do not want to expose lottip to outside world. In this case here's what you may do:

  1. Upload lottip binary to remote dev server and run it like this: ./lottip_linux_amd64
  2. Create ssh tunnel from your local machine to remote dev server like this: ssh -nNT -L 9999:127.0.0.1:9999 [email protected]. This command will map your local :9999 to remote :9999
  3. Tell your remote app to use MySQL on port :4041
  4. Open http://127.0.0.1:9999 locally.

Options

You can change default values to whatever you need.

option available default value description
--proxy 127.0.0.1:4041 <ip>:<port> of proxy server. Your code should make connections to that address to make proxy work. Example: --proxy=127.0.0.1:4045
--mysql 127.0.0.1:3306 <ip>:<port> of MySQL server. Example: --mysql=192.168.0.195:3308
--gui 127.0.0.1:9999 <ip>:<port> of embedded GUI. Example: --gui=127.0.0.1:8080
--mysql-dsn "" If you need to execute queries from the app you need to provide DSN for MySQL server. DSN format: [username[:password]@][protocol[(address)]]/[dbname[?param1=value1&...&paramN=valueN]] All values are optional. So the minimal DSN is /dbname. If you do not want to preselect a database, leave dbname empty: / Example: --mysql-dsn=root:[email protected]/

ToDo

  • [ ] Write Unit tests
  • [ ] Implement more features of MySQL protocol
  • [x] Add query filtering by string
  • [ ] Add sql code highlighting
  • [ ] Add sql code formatting
  • [x] Add possibility to execute query right from GUI and see results
  • [ ] Add ssl support
  • [ ] Add support of PostgreSQL protocol
  • [ ] ... and more

Known problems

Currently lottip does not support secure connections via ssl. The workaround is to disable SSL on MySQL server or connect with option like --ssl-mode=DISABLED

Contribute

You're very welcome to report bugs, make pull requests, share your thoughts and ideas!

Licence

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].