func NewConn(addr string, dbName string, dbUser string, dbPass string) (*Conn, error) {
	config := NewConfig(addr, dbName, dbUser, dbPass)
	conn, err := client.Connect(addr, dbUser, dbPass, dbName)
	if err != nil {
		return nil, err
	}
	err = conn.SetCharset(DefaultCharSet)
	if err != nil {
		return nil, err
	}
	err = conn.UseDB(dbName)
	if err != nil {
		return nil, err
	}
	return &Conn{
		Config: config,
		Conn:   conn,
	}, nil
}
NewConn returns connection to mysql database, be aware that addr is host:port style, default charset is utf8mb4
package mysql
import (
	"context"
	"fmt"
	"github.com/go-mysql-org/go-mysql/client"
	"github.com/romberli/go-util/common"
	"github.com/romberli/go-util/constant"
)
type ReplicationRole string
const (
	DefaultCharSet       = "utf8mb4"
	HostString           = "host"
	PortString           = "port"
	SelectVersionSQL     = "select @@version"
	ShowSlaveStatusSQL   = "show slave status"
	ShowReplicaStatusSQL = "show replica status"
	ShowSlaveHostsSQL    = "show slave hosts"
	ReplicationSource ReplicationRole = "source"
	ReplicationReplica ReplicationRole = "replica"
	ReplicationRelay ReplicationRole = "relay"
)
type Config struct {
	Addr   string
	DBName string
	DBUser string
	DBPass string
}
func NewConfig(addr string, dbName string, dbUser string, dbPass string) Config {
	return Config{
		Addr:   addr,
		DBName: dbName,
		DBUser: dbUser,
		DBPass: dbPass,
	}
}
type Conn struct {
	Config
	*client.Conn
}