进入容器,修改/etc/mysql/my.cnf

添加如下配置

[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
default-character-set=utf8

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
character-set-server=utf8

[mysql]
no-auto-rehash
default-character-set=utf8

重启容器

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐