Skip to content

Client does not support charset utf8mb4_0900_ai_ci'; #150

@pinksuko

Description

@pinksuko

mysql: 8.4.2
code:

 function _M.new()
     local db, err = mysql:new()
     if not db then
        ngx.log(ngx.ERR, "failed to instantiate mysql: ", err)
        return nil, err
     end

     db:set_timeout(1000)   --1 second

     local ok, err = db:connect {
         host = "127.0.0.1",
         port = 3306,
         database = "master_db",
         user = "pinksuko",
         password = "suda.123",
		 charset = "utf8mb4",
		 max_packet_size = 1024 * 1024,
     }
	 
     if not ok then
	ngx.log(ngx.ERR, "failed to connect: ", err)
	return nil, err
      end

     return db

end

error.log:

failed to connect: charset 'utf8mb4_0900_ai_ci' is not supported

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions