Categorygithub.com/vczyh/mysql-protocol
repository
1.0.5
Repository: https://github.com/vczyh/mysql-protocol.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# 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
}