功能:让mysql数据库能够支持中文,必须设置系统字符集编码
输入命令:
show variables like ‘char%’;
可以查看当前连接系统的情况
mysql 设置字符集
然后输入
set character_set_database=’gbk’;
set character_set_server=’gbk’;

讲数据库和服务器的字符集均设为gbk(中文)
最后输入命令
status;

mysql 设置字符集

使整个系统支持中文

设置操作权限
use mysql;
grant all privileges on . to ‘root’@’%’ identified by ‘njnu123456’ with grant option;

flush privileges;

mysql 设置字符集

相关文章:

  • 2021-12-22
猜你喜欢
  • 2021-05-28
  • 2021-11-03
  • 2021-04-04
  • 2022-02-07
  • 2022-01-14
相关资源
相似解决方案