zoukankan      html  css  js  c++  java
  • 命令行解决mysql中文乱码

    修改my.ini文件中的

    [mysql]

    default-character-set=gbk

    [mysqld]

    # The default character set that will be used when a new schema or table is
    # created and no character set is defined
    character-set-server=utf8

    修改后,重启mysql。结果:

    mysql> show variables like 'character_set%';
    +--------------------------+-------------------------------------------+
    | Variable_name | Value |
    +--------------------------+-------------------------------------------+
    | character_set_client | gbk |
    | character_set_connection | gbk |
    | character_set_database | utf8 |
    | character_set_filesystem | binary |
    | character_set_results | gbk |
    | character_set_server | utf8 |
    | character_set_system | utf8 |
    | character_sets_dir | D:MySQLMySQL Server 5.5sharecharsets |
    +--------------------------+-------------------------------------------+

    即使再次打开mysql还是这样的。

  • 相关阅读:
    crypto 密码加密
    -webkit-box 高度自动填满
    performance数据
    AJAX
    Javascript sort方法
    Javascript reduce方法
    如何让div内的多行文本上下左右居中
    js基础
    for循环的执行顺序
    json对象和json字符串
  • 原文地址:https://www.cnblogs.com/hjy9420/p/5259505.html
Copyright © 2011-2022 走看看