Giter VIP home page Giter VIP logo

proxysql's Introduction

Golang ProxySQL Library


1.introduce


A ProxySQL Go library.

2. Requirements


  1. Go 1.7 or higher.
  2. ProxySQL 1.3.x

3. Installation

Simple install the package to your $GOPATH with the go tool from shell:

# go get -u github.com/imSQL/proxysql

Make sure git command is installed on your OS.

4. Usage


example:

list all mysql_users .

conn, err := NewConn("172.18.10.111", 13306, "admin", "admin")
if err != nil {
	t.Error(conn, err)
}

conn.SetCharacter("utf8")
conn.SetCollation("utf8_general_ci")
conn.MakeDBI()

db, err := conn.OpenConn()
if err != nil {
	t.Error(db, err)
}

allusers, err := FindAllUserInfo(db, 1, 0)
if err != nil {
	t.Error(allusers, err)
}

5. Test


You can execute 'go test' command to test this project.

if proxysql is listening 172.18.10.136:13306, execute follow command:

# go test --args -addr 172.18.10.136 -port 13306 -user admin -pass admin

Donate


If you like the project and want to buy me a cola, you can through:

PayPal 微信

proxysql's People

Contributors

taylor840326 avatar

Watchers

 avatar  avatar

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.