mysql-protocol

module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2022 License: MIT

README

MySQL SDK by Go.

The following has been implemented:

Install

go get github.com/vczyh/mysql-protocol

Client

conn, err := client.CreateConnection(
    client.WithHost("10.0.44.59"),
    client.WithPort(3306),
    client.WithUser("root"),
    client.WithPassword("Unicloud@1221"))

if err != nil {
	// handle error
}

if err := conn.Ping(); err != nil {
	// handle error
}

Server

srv := server.NewServer(
  server.NewDefaultHandler(),
  server.WithHost("0.0.0.0"),
  server.WithPort(3306),
  server.WithUser("root"),
  server.WithPassword("root"))

if err := srv.Start(); err != nil {
  // handle error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL