diff --git a/client/auth.go b/client/auth.go index 200009609..a491dd82f 100644 --- a/client/auth.go +++ b/client/auth.go @@ -275,7 +275,7 @@ func (c *Conn) writeAuthHandshake() error { data[11] = 0x00 // Charset [1 byte] - // use default collation id 33 here, is `utf8mb3_general_ci` + // use default collation id 255 here, is `utf8mb4_0900_ai_ci` collationName := c.collation if len(collationName) == 0 { collationName = DEFAULT_COLLATION_NAME diff --git a/mysql/const.go b/mysql/const.go index 09c62cc3d..293382a38 100644 --- a/mysql/const.go +++ b/mysql/const.go @@ -183,10 +183,10 @@ const ( DEFAULT_IPV6_ADDR = "[::1]:3306" DEFAULT_USER = "root" DEFAULT_PASSWORD = "" - DEFAULT_FLAVOR = "mysql" - DEFAULT_CHARSET = "utf8" - DEFAULT_COLLATION_ID uint8 = 33 - DEFAULT_COLLATION_NAME string = "utf8_general_ci" + DEFAULT_FLAVOR = MySQLFlavor + DEFAULT_CHARSET = "utf8mb4" + DEFAULT_COLLATION_ID uint8 = 255 + DEFAULT_COLLATION_NAME string = "utf8mb4_0900_ai_ci" ) const (