Mysql设置字符编码及varchar宽度问题
2024-10-18 06:51:17
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个汉字
最新文章
- 【Android】开发中个人遇到和使用过的值得分享的资源合集
- [Tool] github 入手教程
- Github+Jekyll —— 创建个人免费博客(二)Ruby+Jekyll部署
- jackson注解使用心得
- SQL 查询总结
- eclipse下启动tomcat出现Setting property 'source' to 'org.eclipse.jst.jee.server: '错误的解决办法
- android 常见分辨率(mdpi、hdpi 、xhdpi、xxhdpi )屏幕适配
- 单机最大tcp连接数
- Delphi自定义窗口过程WinProc
- Structs1 -配置例子(转)
- Assigning Workstations
- Cannot declare class app\home\controller\Cases because the name is already in use
- mac上php版本切换
- anaconda 命令集合
- vue-cli 选项无法选问题
- .Net Core Web应用发布至IIS后报“An error occurred while starting the application”错误
- 让网站和APP更具动感的几点建议
- /var/log/messages Logging not working on Centos 7
- Git最常用的命令 总结
- 管理页面的 setTimeout &; setInterval
热门文章
- 亲测 logminer挖掘
- error LNK2026: 模块对于 SAFESEH 映像是不安全的
- windows7旗舰版激活密钥永久版免费分享
- linux包之procps之vmstat命令
- js跳转到页面中指定的hash
- 决策树模型组合之(在线)随机森林与GBDT
- mysqldump: Got error: 1556: You can't use locks with log tables. when using LOCK TABLES
- RMAN备份与恢复之DataBase
- 每日学习心得:未定义的命名空间前缀";xsd";问题和<;%%>;、<;%=%>;、<;%$%>;、<;%@%>;的区别
- C基础--函数指针的使用