ubuntu16.04通过仓库安装的mysql5.7的配置文件在

/etc/mysql/mysql.conf.d/mysqld.cnf

修改字符只需要 在[mysqld]

character-set-server=utf8
collation-server=utf8_general_ci

然后重启

sudo service mysql start

当你设置了UTF8编码 那么varchar(4)这个4即表示最多4个英文字母,当是汉字的时候也是最多4个汉字

最新文章

  1. 【Android】开发中个人遇到和使用过的值得分享的资源合集
  2. [Tool] github 入手教程
  3. Github+Jekyll —— 创建个人免费博客(二)Ruby+Jekyll部署
  4. jackson注解使用心得
  5. SQL 查询总结
  6. eclipse下启动tomcat出现Setting property 'source' to 'org.eclipse.jst.jee.server: '错误的解决办法
  7. android 常见分辨率(mdpi、hdpi 、xhdpi、xxhdpi )屏幕适配
  8. 单机最大tcp连接数
  9. Delphi自定义窗口过程WinProc
  10. Structs1 -配置例子(转)
  11. Assigning Workstations
  12. Cannot declare class app\home\controller\Cases because the name is already in use
  13. mac上php版本切换
  14. anaconda 命令集合
  15. vue-cli 选项无法选问题
  16. .Net Core Web应用发布至IIS后报“An error occurred while starting the application”错误
  17. 让网站和APP更具动感的几点建议
  18. /var/log/messages Logging not working on Centos 7
  19. Git最常用的命令 总结
  20. 管理页面的 setTimeout & setInterval

热门文章

  1. 亲测 logminer挖掘
  2. error LNK2026: 模块对于 SAFESEH 映像是不安全的
  3. windows7旗舰版激活密钥永久版免费分享
  4. linux包之procps之vmstat命令
  5. js跳转到页面中指定的hash
  6. 决策树模型组合之(在线)随机森林与GBDT
  7. mysqldump: Got error: 1556: You can't use locks with log tables. when using LOCK TABLES
  8. RMAN备份与恢复之DataBase
  9. 每日学习心得:未定义的命名空间前缀"xsd"问题和<%%>、<%=%>、<%$%>、<%@%>的区别
  10. C基础--函数指针的使用