`
manyinjin
  • 浏览: 92405 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

mysql without installer 使用手记

阅读更多
1.下载 mysql-noinstaller.zip
2.修改其中的某个ini配置文件,添加utf8字符集处理
    [mysql]下添加:
    default-character-set=utf8
    [mysqld]下添加:
    #Path to installation directory. All paths are usually resolved relative to this.
    basedir=e:\\tmp/database
    #Path to the database root
    datadir=e:\\tmp\\database\\data
    default-character-set=utf8
    collation_server=utf8_unicode_ci
    //server端编码为utf8
    character_set_server=utf8
    //强制客户端编码为utf8
    skip-character-set-client-handshake
3.运行,mysqld默认要在window_home里找my.ini,不过我们可以在mysqld运行时制定配置文件:
    mysqld --defaults-file=./my-large.ini
4.关闭
    mysqladmin -u root -ppassword shutdown

BTW,
    I have to attach the "characterEncoding=utf8" to the connection url since i set this "skip-character-set-client-handshake" in my.ini.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics