1、解压ZIP文件到安装目录;

2、进入到bin目录,试运行mysqld --console,查看可能的出错信息,安装相应的辅助软件,如.net V4.0等;

3、编辑my.ini文件,关键内容如下:

    [client] default-character-set=utf8 [mysqld]

    # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.

    innodb_buffer_pool_size = 1023M

    # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin

    # These are commonly set, remove the # and set as required.

    basedir =D:/Application/mysql-5.7.9-winx64/

    datadir =D:/Application/mysql-5.7.9-winx64/data/

    tmpdir  =D:/Application/mysql-5.7.9-winx64/data/

    log-error=D:/Application/mysql-5.7.9-winx64/data/mysql_error.log

     innodb_log_file_size=100M

    port = 3307

    server_id = 1302

注意文件路径要用“/”而不是“\”。

4、生成数据库:

   mysqld --initialize

   结束时会产生一个root的随机密码,记住。

5、启动数据库:

  mysqld  --defaults-file="D:\Application\mysql-5.7.9-winx64\my.ini" --console

6、关闭数据库:

  mysqladmin -uroot -p shutdown

7、安装服务:

mysqld.exe --install MySQL579 --defaults-file="D:\Application\mysql-5.7.9-winx64\my.ini"