mysql容器里不能识别中文输入

mysql容器里输入中文不能使用,查看locale,字符不能识别:

解决:echo "export LANG=C.UTF-8" >>/etc/profile && source /etc/profile 

如果是在宿主机,解决方法:

echo "export LANG=en_US.UTF-8" >> /etc/profile && echo "export LC_ALL=en_US.UTF-8" >> /etc/profile && echo "export LC_CTYPE=en_US.UTF-8" >> /etc/profile && 

source /etc/profile

结束。

posted @ 2020-11-12 15:44  巴州夜雨  阅读(279)  评论(0编辑  收藏  举报