---
title: "mysql without installer 使用手记"
author: "manyinjin"
date: "2008-04-09T11:10:38Z"
tags: ["MySQL"]
slug: "mysql-without-installer"
draft: false
lastmod: "2008-04-09T11:10:38Z"
id: 180747
url: "https://manyinjin.iteye.com/blog/180747"
---

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.