change mysql default charset

This commit is contained in:
xiaojin
2020-04-09 09:24:34 +08:00
committed by 云风
parent 98434708c4
commit d94fbb6493
2 changed files with 2 additions and 1 deletions

View File

@@ -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,

View File

@@ -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
}) })