mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
change mysql default charset
This commit is contained in:
@@ -674,7 +674,7 @@ function _M.connect(opts)
|
|||||||
local database = opts.database or ""
|
local database = opts.database or ""
|
||||||
local user = opts.user or ""
|
local user = opts.user or ""
|
||||||
local password = opts.password or ""
|
local password = opts.password or ""
|
||||||
local charset = CHARSET_MAP[opts.charset or "utf8mb4"]
|
local charset = CHARSET_MAP[opts.charset or "_default"]
|
||||||
local channel =
|
local channel =
|
||||||
socketchannel.channel {
|
socketchannel.channel {
|
||||||
host = opts.host,
|
host = opts.host,
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ skynet.start(function()
|
|||||||
database="skynet",
|
database="skynet",
|
||||||
user="root",
|
user="root",
|
||||||
password="123456",
|
password="123456",
|
||||||
|
charset="utf8mb4",
|
||||||
max_packet_size = 1024 * 1024,
|
max_packet_size = 1024 * 1024,
|
||||||
on_connect = on_connect
|
on_connect = on_connect
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user