func New(proto, laddr, raddr, user, passwd string, db ...string) mysql.Conn {
	my := Conn{
		proto:         proto,
		laddr:         laddr,
		raddr:         raddr,
		user:          user,
		passwd:        passwd,
		stmt_map:      make(map[uint32]*Stmt),
		max_pkt_size:  16*1024*1024 - 1,
		timeout:       2 * time.Minute,
		fullFieldInfo: true,
	}
	if len(db) == 1 {
		my.dbname = db[0]
	} else if len(db) > 1 {
		panic("mymy.New: too many arguments")
	}
	return &my
}
Create new MySQL handler. The first three arguments are passed to net.Bind
for create connection. user and passwd are for authentication. Optional db
is database name (you may not specify it and use Use() method later).
package native
import (
	"bufio"
	"fmt"
	"io"
	"net"
	"reflect"
	"strings"
	"time"
	"github.com/ziutek/mymysql/mysql"
)
type serverInfo struct {
	prot_ver byte
	serv_ver []byte
	thr_id   uint32
	scramble [20]byte
	caps     uint16
	lang     byte
}
type Conn struct {
	proto string  
	laddr string  
	raddr string  
	user   string  
	passwd string  
	dbname string  
	net_conn net.Conn  
	rd       *bufio.Reader
	wr       *bufio.Writer
	info serverInfo  
	seq  byte        
	unreaded_reply bool
	init_cmds []string          
	stmt_map  map[uint32]*Stmt  
	status mysql.ConnStatus
	max_pkt_size int
	timeout time.Duration
	dialer mysql.Dialer
	narrowTypeSet bool
	fullFieldInfo bool
	Debug bool
}