GithubHelp home page GithubHelp logo

umyproxy's Introduction

umyproxy

GitHub GitHub go.mod Go version (subdirectory of monorepo) GitHub Repo stars

umyproxy 是一个 mysql 的本地代理服务程序。 可以为基于 php-fpm 的 PHP 程序提供 mysql 连接池的功能, 解决高并发中短连接产生大量 TIME_WAIT 的问题。

umyproxy 使用 Unix domain socket 与客户端进行通信, 第一次与 mysql 服务端建立连接, 代理 client 端进行通信,认证通过后复用连接并放入连接池。 client 端第二次连接时采用假的认证方式认证。

特点

  • 支持 mysql 连接池。
  • 纯 go 语言开发, 不依赖第三方库。
  • 使用 Unix domain socket 通信。
  • 使用简单,不需要配置 mysql 账号密码。

使用

laravel 框架为例

  1. 启动服务
./umyproxy -host 127.0.0.1 -port 3306 -socket /tmp/umyproxy.socket
  1. 配置数据库

修改数据库配置: ./config/database.php

mysql 配置增加

'unix_socket' => '/tmp/umyproxy.socket',

查看帮助

./umyproxy -h

编译

./build

demo

demo

laravel 使用

https://github.com/lyuangg/laravel-umyproxy

umyproxy's People

Contributors

duxphp avatar lyuangg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

umyproxy's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.