Skip to content

The connect function is thrown incorrectly #139

@give-it-a-try-1

Description

@give-it-a-try-1

When my mysql uses the connect function, it keeps throwing errors, which has cost us two weeks!! I hope someone can help me

Error: lua entry thread aborted: runtime error: attempt to yield across C-call boundary

There is no problem with mysqlConfig

local mysqlConfig = {
    host = "127.0.0.1",
    port = 3306,
    database = "win_mutil_web",
    user = "root",
    -- password = "ql532624.",
    password = "123456",
}
local db, err = mysql:new()
if not db then
    ngx.log(ngx.ERR, "failed to instantiate mysql: ", err)
    return nil
end
-- 1 sec
db:set_timeout(1000)
local ok, err, errcode, sqlstate = db:connect(mysqlConfig)

If I execute connect, I'm going to throw an error

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