查看mysql编码方式的方法:
1、需要以root用户身份登陆才可以查看数据库编码方式
以root用户身份登陆的命令为:>mysql -u root –p,之后两次输入root用户的密码
2、查看数据库的编码方式命令为:
>show variables like 'character%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | latin1 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+