Skip to content

strict mode causes mariadb 10.3.0 db connections to fail #635

Closed
@jmhodges

Description

@jmhodges

Using current HEAD (bf7f34f), code that enables Config.Strict will fail when trying to send queries to a mariadb 10.3.0 database. It returns Error 1158: Got an error reading communication packets.

	cfg, err := mysql.ParseDSN(dsn)
	if err != nil {
		return nil, fmt.Errorf("dbhelp.Open: unable to parse MySQL DSN: %s", err)
	}
	cfg.Strict = true
	dbDSN := cfg.FormatDSN()
	db, err := sql.Open("mysql", dbDSN)
	if err != nil {
		log.Fatalf("Open: %s", err)
	}
	err = db.Ping()
	if err != nil {
		log.Fatalf("Ping: %s", err)
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions