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

结束。

原文地址:https://www.cnblogs.com/liusingbon/p/13963973.html