使用SQL语句修改Mysql数据库字符集的方法 修改库: alter database [$database] character set [$character_set] collate [$collation_name] 注:[$database]为数据库的库名.[$character_set]为字符集名称.[$collation_name]为排序规则名称.eg:alter database dbsdq character set utf8mb4 collate utf8mb4_unic…
mysql中文乱码解决方法:将mysql数据库编码统一utf8 查看数据库编码: show variables like 'character%'; 编辑/etc/my.cnf [mysql] default-character-set=utf8 [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to preve…